For this, could you show us how you create your branch? I suspect you git
checkout -b my-new-branch origin/master (or something along this line).

The problem with this approach is that branches are mere pointers to a
commit (ie. the tip of the branch). So when you create a new branch
starting at origin/master, you will see just that: the state of the
repository at the time of origin/master's last commit (which, as you say,
doesn’t have your changes because reviews take some time.)

To overcome this, create your new branch at your latest change. Check out
your last branch, and issue git checkout -b my-new-branch. This will start
the new branch at HEAD, which already has your changes. The only drawback
here is that Git won't set an upstream branch. To do that, you can use git
branch --set-upstream-to=origin/master.

Best,

Gergely
On Thu, Nov 10, 2016, 06:22 AD S <[email protected]> wrote:

Hi all, I just wanted to run this past someone as I am having trouble
understanding how this works with workflow.

I'm working on a large project (currently doing some SASS). I'll get a job
to, say, style a particular page. When I'm finished I'll push my changes to
Github where they will be reviewed and eventually combined into the larger
project, which can take some time.


In the mean time, I need to work on other tasks, so I git checkout a new
branch. This removes from my directories the .scss files I've been working
on. I run into a problem if, on the new task, I need to use or adjust some
of the existing styling I've made which is now no longer present on my
local. I can manually copy paste the code from Github, but that seems silly.

What can I do to work around this?

-- 
You received this message because you are subscribed to the Google Groups
"Git for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to [email protected].
For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to