Results: 1578
Notes
  • Newest first
  • Oldest first
  • Newest first(All)
  • Oldest first(All)
Shows the content of the file to the Git console
cat .git/config
by Valeri Tandilashvili
5 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
5 years ago
0
Git
1
git alias
Creates alias
adog
globally
git config --global alias.adog "log --all --decorate --oneline --graph"
Which can lately be run using the follwing command
git adog
After the command execution, In global
config
file will be added the following
[alias]
	adog = log --all --decorate --oneline --graph
by Valeri Tandilashvili
5 years ago
0
Git
2
git log --graph
Draw a text-based graphical representation of the commit history on the left hand side of the output. This may cause extra lines to be printed in between commits, in order for the graph history to be drawn properly
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 branch
by Valeri Tandilashvili
5 years ago
0
Git
0
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
5 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
5 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
5 years ago
0
Git
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
5 years ago
0
Git
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
5 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
5 years ago
0
Git
Git Tutorials
1
Results: 1578