git_notes
This is an old revision of the document!
Table of Contents
dummy
stackoverflow answers I came across
- ignore all directories with a specific name - https://stackoverflow.com/questions/1470572/ignoring-any-bin-directory-on-a-git-project
show which branch is linked to which remote branch
rename a branch that has already been pushed
tags | change the remote branch name
show contents of a deleted file
git show HEAD^:full/path/to/file/from/top/dir/of/the/repository
See also:
- https://stackoverflow.com/questions/1395445/viewing-a-deleted-file-in-git - I got the answer from here. It also contains a few other alternate solutions.
git grep commands
dokuwiki table syntax
git grep -i --all-match -e '\^.*\^' -e '|.*|'
git commands usage
git cherry-pick
git cherry-pick <Commit1> <Commit2> <...>
Ref:-
- https://learngitbranching.js.org/ → Moving Work Around → 1: Cherry-pick Intro
frequently used
newly created repo
git config user.name "Kamaraju S. Kusumanchi" git config user.email "kamaraju@gmail.com"
pull related
for git $\geq$ 2.23.0
git -c advice.detachedHead=false pull --rebase --autostash -v origin
for git $\leq$ 2.20.1
git pull --rebase --autostash -v origin
used in | https://github.com/KamarajuKusumanchi/rutils/blob/master/bin/git-up
git_notes.1615912804.txt.gz · Last modified: 2021/03/16 16:40 by raju