I m going to write features of git which I feel are advanced.
where e39f5d5f122029f6e1271 is the commit which I want to amend.
Now some thing like this will come, which is self explanatory,
now change those commits to "edit" from "pick". Save and close.
Now edit those files you want to and do git add for the files.
After that git commit --amend
then,
git rebase --continue
1. Editing a commit which is not HEAD
git rebase -i e39f5d5f122029f6e1271^where e39f5d5f122029f6e1271 is the commit which I want to amend.
Now some thing like this will come, which is self explanatory,
now change those commits to "edit" from "pick". Save and close.
Now edit those files you want to and do git add for the files.
After that git commit --amend
then,
git rebase --continue
2. Interactive adding of files(git add -i)
3. Git bisecting to find out where bug was introduced.
commands,
git bisect start
git bisect bad /* inform git that current commit you are on is broken */
git bisect good [good_commit_id] /* inform git about the working commit */
Now git will checkout to the middle of these commit. You have to build and test if bug exits now.
If bug is present, then type
git bisect bad
else
git bisect good
To finish,
git bisect reset.
3. Git send email.
http://burzalodowa.wordpress.com/2013/10/05/how-to-send-patches-with-git-send-email/4. git add only few changes in same file
git add -p filename.c5. Git grep on different branches
git grep -n "string here"
No comments:
Post a Comment