Free online version of "Pro Git" book.
cherry valley forever

gracie abrams

EXPECTATIONS
Cosimo Galluzzi

β£ Chile in a Photography β£
Xuebing Du
Sweet Seals For You, Always
KIROKAZE
The Bowery Presents

blake kathryn
RMH

Love Begins

β
2025 on Tumblr: Trends That Defined the Year
todays bird

ellievsbear

seen from United States

seen from Canada

seen from United States

seen from Australia
seen from United States

seen from United States
seen from United States

seen from United States
seen from United States
seen from United States

seen from United States

seen from United States
seen from United States
seen from Argentina

seen from United States
seen from United States
seen from Malaysia

seen from Malaysia
seen from Canada

seen from United States
@git-notes-blog
Free online version of "Pro Git" book.

Anya is live and ready to show you everything. Watch her strip, dance, and perform exclusive shows just for you. Interact in real-time and make your fantasies come true.
Free to watch β’ No registration required β’ HD streaming
Common ancestor of 2 branches
$ git merge-base branch-one branch-two 40f8dcb5433bf9665fc5973e399b63a3495c8448
Create a branch from a stash
$ git stash branch branch-name
UnApply a stash
$ git stash show -p stash@{0} | git apply -R
Commit partial changes in a file
If you want to commit just some changes in one of your files run this:
$ git add -p $ git add --patch # long syntax
You can do the same in the interactive mode:
$ git add -i $ git add --interactive # long syntax
Select 5 (patch mode) from the menu.

Anya is live and ready to show you everything. Watch her strip, dance, and perform exclusive shows just for you. Interact in real-time and make your fantasies come true.
Free to watch β’ No registration required β’ HD streaming
Commit ranges: triple dot
Triple dot notation gets all NON common ranges of two branches. In other words, all commits that are reachable by either branch but not common. Basically, all commits in either branch that were introduced after common ancestor.
$ git log branch-one...branch-two F E D C
Add --left-right flag to show which side of the range does a commit belong:
$ git log --left-right branch-one...branch-two > F < E < D > C
Commit ranges: double dot
Double dot range specification basically says: "get all commits that are reachable from one branch and not reachable by the other".
$ git log branch-one..branch-two
This will show all commits that are in branch-two up the the common ancestor of branch-two and branch-one.
Alternative notation:
$ git log branch-two --not branch-one $ git log branch-two ^branch-one
Git reflog formated as log
To see reflog information formatted like the git log output, you can run
$ git log -g
The number of randomly hashed objects needed to ensure a 50% probability of a single collision is about 2^80. 2^80 is 1.2 x 10^24 or 1 million billion billion. Thatβs 1,200 times the number of grains of sand on the earth.
http://git-scm.com/book/en/Git-Tools-Revision-Selection#A-SHORT-NOTE-ABOUT-SHA-1
Current branch's SHA-1 hash
$ git rev-parse branch-name 40f8dcb5433bf9665fc5973e399b63a3495c8448

Anya is live and ready to show you everything. Watch her strip, dance, and perform exclusive shows just for you. Interact in real-time and make your fantasies come true.
Free to watch β’ No registration required β’ HD streaming
Check commit for whitespace & new-line changes
While working on some feature you or your IDE might have introduced unnecessary changes to files like whitespace or new-lines. Git lets you check for whitespace and new-line changes using command:
git diff --check
This outputs something like:
some-file.txt:3: trailing whitespace. + some-file.txt:3: new blank line at EOF.
Git can use four network protocols to transfer data: Local, Secure Shell (SSH), Git, and HTTP.
Publish your local repo over HTTP/S Protocol
$ cd /var/www/htdocs/ $ git clone --bare /path/to/git_project gitproject.git $ cd gitproject.git $ mv hooks/post-update.sample hooks/post-update $ chmod a+x hooks/post-update
The post-update hook that comes with Git by default runs the appropriate command (git update-server-info) to make HTTP fetching and cloning work properly. This command is run when you push to this repository over SSH; then, other people can clone via something like:
$ git clone http://example.com/gitproject.git
It's possible to make Git push over HTTP as well, although that technique isnβt as widely used and requires you to set up complex WebDAV requirements.
http://www.kernel.org/pub/software/scm/git/docs/howto/setup-git-server-over-http.txt
Remove/delete remote branch
git push origin :branch_name
Basically this says: "push empty branch into the remote repository (origin) branch named branch_name".
Unmodifing / Reverting files
To revert your changes to the file and get the fresh copy from the last commit:
git checkout -- file-to-revert.ext

Anya is live and ready to show you everything. Watch her strip, dance, and perform exclusive shows just for you. Interact in real-time and make your fantasies come true.
Free to watch β’ No registration required β’ HD streaming
Moving files in Git
git mv file_from file_to
is a shortcut for:
mv file_from file_to git rm file_from git add file_to
Git does not track file movement, it implicitly guesses that a file is being moved/renamed.
Remove tracked/committed file from git repository
To remove tracked and previously committed file from your git repository use this command:
git rm file-name-or-glob
File removal will be staged for the next commit.
NOTE: If you already staged (added to index using `git add file`) you'll need to add `-f` flag to force the removal.