git config
git config --list
git config --list --show-origin
git config --global user.name "Some Name"
git config --global user.email "[email protected]"
git init
git status
git log <file>
git log --all --decorate --oneline --graph
git log --pretty=format:"%cn hizo un commit %h el dia %cd
git log shortlog
git log > log.txt
save logs ina file (txt in this case)git log --after=“2018-1-2” --before=“today”
by dategit log --author=“Name Author”
by authorgit show <file>
git diff <commit number tag #1> <commit number tag #2>
compare differencesgit status
git add .
orgit add <relative-path-file>
git commit -m "Some description"
git commit -am "Some description"
Add and commit at the same timegit clone <url>
git fetch
git merge
git pull
Simplifly "git fetch" & "git merge"git push
Push your local commitsgit rm <file>
git rm --cached <file>
remove from staging areagit rm --force <file>
remove HDDgit reset --soft
back to staginggit reset --mixed
back to working directorygit reset --hard
delete everythinggit reset HEAD
remove changes from staginggit checkout <commit-id> <file>
OPTIONAL FILEgit checkout <branch-name>
back to lastest commit/changesgit branch <branch-name
create a new branchgit branch -l
list branchesgit merge <branch-name>
make a commit with a mergegit remote add origin <url>
add remotegit remote -v
list remote origingit push origin <branch-name>
push the a branch to origin (that is our remote branch)git pull origin master --allow-unrealated-histories
merge remote history branch to local branch
di4m0nds / git-learning-resources Goto Github PK
View Code? Open in Web Editor NEWlearning git and github