work:git-guide
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionLast revisionBoth sides next revision | ||
work:git-guide [2015/03/05 07:52] – [git tag] percy | work:git-guide [2016/11/04 16:55] – percy | ||
---|---|---|---|
Line 384: | Line 384: | ||
git push origin master | git push origin master | ||
</ | </ | ||
+ | |||
+ | ==== change url ==== | ||
+ | git remote set-url origin https:// | ||
==== create patch ==== | ==== create patch ==== | ||
Line 435: | Line 438: | ||
Then create new branch base on the current commitment | Then create new branch base on the current commitment | ||
git branch newtagbranch | git branch newtagbranch | ||
+ | | ||
+ | ==== git fetch & git merge ==== | ||
+ | |||
+ | Refer to | ||
+ | - http:// | ||
+ | - http:// | ||
+ | - http:// | ||
+ | |||
+ | < | ||
+ | git checkout feature/ | ||
+ | git fetch origin feature/ | ||
+ | git diff tmp | ||
+ | git merge tmp | ||
+ | |||
+ | git checkout feature/ | ||
+ | git fetch --all | ||
+ | git fetch origin feature/ | ||
+ | git diff feature/ | ||
+ | git merge origin/ | ||
+ | |||
+ | git branch -D tmp | ||
+ | |||
+ | git checkout feature/ | ||
+ | git fetch origin feature/ | ||
+ | git checkout -b newBrach origin/ | ||
+ | |||
+ | #Delete the local branch that already deleted from the remote | ||
+ | git remote prune origin | ||
+ | |||
+ | #Remote server | ||
+ | git remote -v | ||
+ | |||
+ | #Remote branch | ||
+ | git branch -r | ||
+ | #All branch | ||
+ | git branch -a | ||
+ | |||
+ | #Show the remote repo information | ||
+ | git remote show origin | ||
+ | git remote prune origin | ||
+ | </ | ||
+ | |||
+ | ==== git subtree ==== | ||
+ | Refer to | ||
+ | http:// | ||
+ | <code bash> | ||
+ | git remote add -f datalayer | ||
+ | git subtree add --prefix=datalayer datalayer integration_lean --squash | ||
+ | git fetch all --prune | ||
+ | git fetch datalayer integration_lean | ||
+ | git subtree pull --prefix=datalayer/ | ||
+ | git subtree push --prefix=datalayer/ | ||
+ | </ | ||
+ | |||
+ | |||
+ | ==== git checkout specified file from another branch ==== | ||
+ | |||
+ | * http:// | ||
+ | |||
+ | git checkout branch_name -- path/ | ||
+ | | ||
+ |
/var/www/dokuwiki/wiki/data/pages/work/git-guide.txt · Last modified: 2018/02/05 19:15 by percy