git

Differences

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

Link to this comparison view

Next revision
Previous revision
git [2019/02/08 09:30] – created danigit [2019/12/23 08:24] (current) – external edit 127.0.0.1
Line 23: Line 23:
 file:.git/config    core.ignorecase=true file:.git/config    core.ignorecase=true
 file:.git/config    core.precomposeunicode=true file:.git/config    core.precomposeunicode=true
-file:.git/config    remote.origin.url=ssh://dev.daniel-steiner.org/srv/git/kvm.git+file:.git/config    remote.origin.url=ssh://dev.dsteiner.ch/srv/git/kvm.git
 file:.git/config    remote.origin.fetch=+refs/heads/*:refs/remotes/origin/* file:.git/config    remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*
 file:.git/config    branch.master.remote=origin file:.git/config    branch.master.remote=origin
Line 50: Line 50:
   * List files in local repository<code bash>   * List files in local repository<code bash>
 git ls-files -m -d -u -c git ls-files -m -d -u -c
-</code>|-m|Show modified files in the output                 |+</code> 
 + 
 +|-m|Show modified files in the output                 |
 |-d|Show deleted files in the output                  | |-d|Show deleted files in the output                  |
 |-u|Show unmerged files in the output (forces --stage)| |-u|Show unmerged files in the output (forces --stage)|
Line 59: Line 61:
 git remote -v update git remote -v update
 Fetching origin Fetching origin
-From ssh://dev.daniel-steiner.org/srv/git/shell+From ssh://dev.dsteiner.ch/srv/git/shell
  = [up to date]      master     -> origin/master  = [up to date]      master     -> origin/master
  = [up to date]      from_svn   -> origin/from_svn  = [up to date]      from_svn   -> origin/from_svn
Line 65: Line 67:
   * Corresponding ''.gitignore'' file:<code bash>   * Corresponding ''.gitignore'' file:<code bash>
 *.scpt *.scpt
-</code>||This is usefull, if you add some new ignores which where already checked in into git!|+</code> 
 + 
 +|**Note:**|This is usefull, if you add some new ignores which where already checked in into git!|
  
 ==== Git cache ==== ==== Git cache ====
Line 71: Line 75:
   * Deleting cache for all ''scpt'' extensions (current directory!):<code bash>   * Deleting cache for all ''scpt'' extensions (current directory!):<code bash>
 git rm --cached *.scpt git rm --cached *.scpt
-</code>||Everything is up to date here!|+</code> 
 + 
 +|**Note:**|Everything is up to date here!|
  
 ===== Search in log ===== ===== Search in log =====
Line 115: Line 121:
 git difftool -r 55c5af0 cced6b2 <file> git difftool -r 55c5af0 cced6b2 <file>
 </code> </code>
-  * Show staged diffs:<code bash>+  * Show staged files(s) diffs:<code bash>
 git diff --cached git diff --cached
 </code> </code>
Line 122: Line 128:
 If you want to generate a patch for any changes from any previous commit, you can use ''%%git log%%'' to list it. If you want to generate a patch for any changes from any previous commit, you can use ''%%git log%%'' to list it.
  
-||You can limit the patch output for a limited number of commits (''%%-1%%'', ''%%-2%%'', …​)|+|**Note:**|You can limit the patch output for a limited number of commits (''%%-1%%'', ''%%-2%%'', …​)|
  
   * Show log and the path for one commit (-1):<code bash>   * Show log and the path for one commit (-1):<code bash>
Line 176: Line 182:
 git checkout <remote_name>/<branch_name> <file_or_dir> (2) git checkout <remote_name>/<branch_name> <file_or_dir> (2)
 </code> </code>
- 
  
 |**1**|Using a commit id   | |**1**|Using a commit id   |
 |**2**|Using another branch| |**2**|Using another branch|
  
- +|**Note:**|This is only working, if the path in repository is the same!|
-||This is only working, if the path in repository is the same!| +
  
   * To get the content and write that into a file, use this command:<code bash>   * To get the content and write that into a file, use this command:<code bash>
  • git.1549614636.txt.gz
  • Last modified: 2019/02/08 09:30
  • by dani