On 23.05.2016 16:24, Florence Blanc-Renaud wrote:
Hi all,
as I am ramping up with git, I have a few questions. Let's imagine the
following development workflow:
- I start working on a specific issue and decide to create a branch on
my git repository (on my laptop)
git clone git://git.fedorahosted.org/git/freeipa.git
git branch -b issue
- When my code looks ok, I decide to commit on the branch (still on my
ldaptop)
git add <file>
git commit
I found handy also 'git add -p' which allows you to choose what commit
- Now I would like to push this on my development VM (I already cloned
the repos on the VM). What would be the right command to push only the
branch "issue" to my VM repo? Does the following command push only the
current branch?
git push --repo=ssh://frenaud@<VM IP@>:/path/to/src/freeipa
Could work, I usually just rsync the whole folder to VM
- When the tests are ok and I want to submit a patch, can I stay on
the branch "issue" to create the patch or should I merge first with
the main branch? If a merge is required, is it recommended to pull
then merge or merge then pull?
You can stay on your issue branch, but patch should be rebased to
current master (patch should apply on top of master)
something like:
git checkout master
git pull
git check issue
git rebase master issue
or interactive rebase if you want change order of patches or something
git rebase -i master issue
Thanks for your tips,
Flo.
--
Florence Blanc-Renaud
Identity Management Team, Red Hat
Martin^2
--
Manage your subscription for the Freeipa-devel mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-devel
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code