Reputation: 871
I have feature branch called feature
and a staging branch called staging.
How do I get the most recent updates to staging
and merge it into feature
before pushing feature
to Github?
Upvotes: 1
Views: 1449
Reputation: 327
I would ran something like:
git fetch --all (update your git's knowledge of remote stuff)
git checkout feature ('tags' your folder as code belonging to feature branch and downloading the code)
git pull origin staging (downloads staging code and but keeps it as code belonging to feature branch)
git add . (marks all code changes for commit)
git commit -m'my awesome code changes' ( commits)
git push origin feature (Pushing all your changes to feature branch)
Well, after pull you most likely will need to solve all conflicts. But this is out of the scope :)
But before running any commands from a guy from internet...do a reserve copy :)
Upvotes: 2