git add -A
inside sub-directory, it will stage all of the changes even though some of the changes are up one directory.
But git add .
will only stage all updated, deleted and new files that are inside the sub-directory
If we are inside my_dir
sub-directory, the two commands will do the samegit add . / git add -A my_dir/
https://youtu.be/tcd4txbTtAY?t=349git add
defaults to -A
git add my_dir / git add -A my_dir
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 identicalgit 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
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
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
git log --all
mygit
inside the current folder and an empty git repository into the newly created foldergit init mygit
cat .git/config