User Tools

Site Tools


git_fetch_pull_push

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
git_fetch_pull_push [2019/03/08 09:58]
rpjday [Overview]
git_fetch_pull_push [2019/04/04 03:20] (current)
rpjday [Pushing]
Line 3: Line 3:
 Fetching, pulling and pushing. Fetching, pulling and pushing.
  
-===== Pruning ​=====+===== Fetching ​=====
  
-==== Introduction ====+<​code>​ 
 +$ git fetch [origin] 
 +$ git fetch ln 
 +$ git fetch --all 
 +</​code>​
  
-See ''​man git-fetch''​section "​PRUNING"​. +Before fetchingremove any remote-tracking references that no longer exist on the remote.
- +
-==== Fetching and pruning ====+
  
 <​code>​ <​code>​
-$ git branch -r +$ git fetch [-p|--prune]]
-  origin/HEAD -> origin/​master +
-  origin/​WIP-syscall +
-  origin/​master +
-  origin/​proc-cmdline +
-$ git fetch --prune +
-From https://​git.kernel.org/​pub/​scm/​linux/​kernel/​git/​torvalds/​linux +
- ​- ​[deleted] ​                  ​(none) ​    -> origin/WIP-syscall +
- [deleted                  (none) ​    -> origin/​proc-cmdline +
-$ git branch -r +
-  origin/HEAD -> origin/​master +
-  origin/​master +
-$+
 </​code>​ </​code>​
  
-==== Just pruning ​====+===== Pushing =====
  
 <​code>​ <​code>​
-$ git remote prune <name>+$ git push origin thisbranch:​thatbranch 
 +$ git push origin --delete ​<branchname>
 </​code>​ </​code>​
 +
 +
 +
 +
git_fetch_pull_push.1552039089.txt.gz · Last modified: 2019/03/08 09:58 by rpjday