Results: 1580
Notes
  • Newest first
  • Oldest first
  • Newest first(All)
  • Oldest first(All)
if we run
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 same
git add .  /  git add -A my_dir/
https://youtu.be/tcd4txbTtAY?t=349
by Valeri Tandilashvili
4 years ago
0
Git
Git Tutorials
1
The two commands are identical because
git add
defaults to
-A
git add my_dir  /  git add -A my_dir
by Valeri Tandilashvili
4 years ago
0
Git
Git Tutorials
1
Stages all new and modified files (except deleted - removed files)
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
by Valeri Tandilashvili
4 years ago
0
Git
Git Tutorials
1
Stages only modified and deleted files
git add -u  /  git add --update
Stages only modified and deleted files inside
my_dir
sub-directory
git add -u my_dir/  /  git add --update my_dir/
-u
is shorthand for
--update
by Valeri Tandilashvili
4 years ago
0
Git
Git Tutorials
1
The branch
feature1
will be based on the last commit of the master branch
git rebase master
The branch
feature1
will be based on the commit specified in the command
git rebase 3b06f53
by Valeri Tandilashvili
4 years ago
0
Git
1
git fetch
New commits of
origin/master
branch will be downloaded locally with the same name
git fetch origin master
When the commits are downloaded, we can checkout and see if the change is OK to merge
git checkout origin/master
The two commands
git fetch origin master
git merge origin/master
are equivalent to command
git pull
by Valeri Tandilashvili
4 years ago
0
Git
1
git log another_branch
If we are on
master
and we want to see other branch's commits
git log another_branch
After fetching new commits from remote, we can see the new commits (even if we are on
master
)
git log origin/master --oneline
by Valeri Tandilashvili
4 years ago
0
Git
1
It shows all commits in the history of branches, tags and other refs, but it does not show commits that are not reachable from any ref. A typical example of a commit that is not reachable from any ref is when you've just run git commit --amend: the previous commit still exists locally, but it's no longer reachable and won't be shown in git log --all. But git reflog will confirm that it does indeed still exist
git log --all
by Valeri Tandilashvili
4 years ago
0
Git
1
Creates a directory
mygit
inside the current folder and an empty git repository into the newly created folder
git init mygit
by Valeri Tandilashvili
4 years ago
0
Git
1
Shows the content of the file to the Git console
cat .git/config
by Valeri Tandilashvili
4 years ago
0
Git
1
Results: 1580