cat .git/config
mygit
inside the current folder and an empty git repository into the newly created foldergit init mygit
adog
globallygit config --global alias.adog "log --all --decorate --oneline --graph"
Which can lately be run using the follwing commandgit adog
After the command execution, In global config
file will be added the following[alias]
adog = log --all --decorate --oneline --graph
git log --oneline --all --graph
When --graph is not used, all history branches are flattened which can make it hard to see that the two consecutive commits do not belong to a linear branchgit log --all
origin/master
branch will be downloaded locally with the same namegit fetch origin master
When the commits are downloaded, we can checkout and see if the change is OK to mergegit checkout origin/master
The two commandsgit fetch origin master
git merge origin/master
are equivalent to commandgit pull
feature1
will be based on the last commit of the master branchgit rebase master
The branch feature1
will be based on the commit specified in the commandgit rebase 3b06f53
git add -u / git add --update
Stages only modified and deleted files inside my_dir
sub-directorygit add -u my_dir/ / git add --update my_dir/
-u
is shorthand for --update
git add . --no-all / git add . --ignore-removal
Should be specified path
at least .
--no-all
is the same as --ignore-removal
so the two commands are identical