Wednesday, April 2, 2014

Git

Got to new folder, create new repository: git init
Current status: git status (-s)
Commit to index: git add readme.txt
Commit from index to snapshot: git commit
History: git log
Git gui ctrl+t ctrl +u commit
git log --pretty=raw

git checkout readme.txt (restore file)




git config --global alias.lg "log --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr %an)%Creset' --abbrev-commit --date=relative"
git config --global alias.wipe '!git reset --hard;git clean -fd'
git config --global color.ui auto
git config --global core.editor "nano -Y patch"


No comments:

Post a Comment