User Tools

Site Tools


docs:tips_n_tricks:git:index.html

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
docs:tips_n_tricks:git:index.html [12.05.2023 11:31 CEST] – ↷ Page moved and renamed from docs:tips_n_tricks:git.html to docs:tips_n_tricks:git:index.html peterdocs:tips_n_tricks:git:index.html [24.03.2024 01:30 CET] (current) peter
Line 14: Line 14:
 ---- ----
  
-Preview((provided your working tree is clean)) ''git pull'':+Preview((provided your working tree is clean)) ''git pull origin master''((same as ''git pull'' in most cases)): 
   git fetch origin master ; git diff -R --stat origin/master   git fetch origin master ; git diff -R --stat origin/master
 +
 +----
 +
 +Preview((provided your working tree is clean)) ''git pull origin master''((same as ''git pull'' in most cases)), provide full patch forced agains current state in worktree:
 +
 +  git fetch origin master ; git diff -R --diff origin/master -- .
  
 ---- ----
Line 47: Line 54:
  
 __Reference__: https://stackoverflow.com/questions/15058844/print-branch-description\\  __Reference__: https://stackoverflow.com/questions/15058844/print-branch-description\\ 
-__Workaround__: https://glebbahmutov.com/blog/git-branches-with-descriptions/+__Workaround__: https://glebbahmutov.com/blog/git-branches-with-descriptions/ ([[docs:tips_n_tricks:git:branches.sh|local copy]])
  
 Branch description can bee **created or changed** (and thus been seen also) by: Branch description can bee **created or changed** (and thus been seen also) by:
Line 63: Line 70:
   git push [--dry-run] <remote> --delete <old branch>   git push [--dry-run] <remote> --delete <old branch>
  
 +----
 +Reset file to any version from <commitish>:
 +
 +  git checkout <commitish> -- <file>
 +
 +----
 +Show full contents of file <file> from commit, branch or tag <commitish>:
 +
 +  git show <commitish>:<file>
 +
 +__Credits__: [[https://www.serverlab.ca/scripting-programming/using-git-show-to-view-contents-of-files/|Using Git Show to View Contents of Files]]
 ---- ----
  
 {{entry>git}}{{tag>git}} {{entry>git}}{{tag>git}}
docs/tips_n_tricks/git/index.html.1683883918.txt.gz · Last modified: 12.05.2023 11:31 CEST by peter

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki