I\'ve got two branches from my master:
Use
git cherry-pick <commit>
to apply <commit>
to your current branch.
I myself would probably cross-check the commits I pick in gitk
and cherry-pick them with right-clicks on the commit entry there instead.
If you want to go more automatic (with all its dangers) and assuming all commits since yesterday happened on wss you could generate the list of commits using git log
(with --pretty
suggested by Jefromi)
git log --reverse --since=yesterday --pretty=%H
so everything together assuming you use bash
for commit in $(git log --reverse --since=yesterday --pretty=%H);
do
git cherry-pick $commit
done
If something goes wrong here (there is a lot of potential) you are in trouble since this works on the live checkout, so either do manual cherry-picks or use rebase like suggested by Jefromi.
Or if You are little less on the evangelist's side You can do a little ugly way I'm using. In deploy_template there are commits I want to copy on my master as branch deploy
git branch deploy deploy_template
git checkout deploy
git rebase master
This will create new branch deploy (I use -f to overwrite existing deploy branch) on deploy_template, then rebase this new branch onto master, leaving deploy_template untouched.
For the simple case of just copying the last commit from branch wss to v2.1, you can simply grab the commit id (git log --oneline | head -n 1
) and do:
git checkout v2.1
git merge <commit>