meta data for this page
  •  

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
Next revisionBoth sides next revision
git:start [2015/05/20 12:18] niziakgit:start [2020/06/03 11:19] niziak
Line 1: Line 1:
-GIT PAGE+====== GIT ====== 
 + 
 +====== Preparation ====== 
 + 
 +=== git-email === 
 +<code bash> 
 +sudo apt-get install git-email 
 +git config sendemail.signedoffcc false 
 +git config sendemail.suppressfrom true 
 +</code> 
 + 
 +=== replace github https links === 
 +<code bash>git config --global url.git@github.com:.insteadOf https://github.com/</code> 
 + 
 +====== Import HG (mercurial) repo ====== 
 +<code bash> 
 +sudo apt-get install hg-fast-export 
 +git init 
 +hg-fast-export -r . 
 +</code> 
 + 
 + 
 +====== Usage ====== 
 + 
 +==== fetch moved tags ==== 
 +<code bash>git fetch origin --tags --force</code> 
 ==== Undo a commit ==== ==== Undo a commit ====
 Undo a commit and redo Undo a commit and redo
Line 10: Line 36:
 $ git commit -c ORIG_HEAD      $ git commit -c ORIG_HEAD     
 </code> </code>
 +
  
 ==== Local copy of one branch from public repo ==== ==== Local copy of one branch from public repo ====
Line 26: Line 53:
 And push current branch (we are on ti-linux-3.14.y after checkout) And push current branch (we are on ti-linux-3.14.y after checkout)
 <code bash>git push -u gitlab</code> <code bash>git push -u gitlab</code>
 +
 +==== repo clean and repack ====
 +<code bash>
 +git reflog expire --expire=1.minute refs/heads/master
 +git fsck --unreachable      
 +git prune                   
 +git gc                
 +</code>
 +
 +====== Debug ======
 +<code bash>
 +GIT_TRACE=1 git clone ...
 +GIT_CURL_VERBOSE=1 GIT_TRACE=1 git clone ...
 +</code>