Create and Checkout a New Branch
#branches from currently checked out directory git checkout -b
Checkout a Remote Branch
git checkout -borigin/
Abort Changes of a File
git checkout --
Modify the Previous Commit’s Message
git commit --amend
Partial Change Checkin
git add --edit
Undo the Previous Commit
git revert HEAD^
Temporarily Stash Changes, Restore Later
# After changes have been made... git stash # Do some other stuff here, like switch branches, merge other changes, etc. #Re-apply the changes git stash pop
Delete a Remote Branch
git push origin :
Pull in the Latest from a Shared Repository
# Add a remote branch git remote add# For example: git remote add lightfaceOfficial git://github.com/darkwing/LightFace.git # Get changes from that branch git fetch
Tagging, Deleting, and Pushing Tags
# Create a Tag git tag# Delete the tag git tag -d # Push Tags git push --tags
Who F’d it All Up?
git blame
Комментариев нет:
Отправить комментарий