meta data for this page
  •  

This is an old revision of the document!


GIT PAGE

Preparation

git-email

sudo apt-get install git-email
git config sendemail.signedoffcc false
git config sendemail.suppressfrom true

Undo a commit

Undo a commit and redo

$ git commit ...              
$ git reset --soft HEAD~1     
<< edit files as necessary >> 
$ git add ....                
$ git commit -c ORIG_HEAD     

Usage

Local copy of one branch from public repo

git remote add ti git://git.ti.com/ti-linux-kernel/ti-linux-kernel.git
git remote add tilocal /home/user/mirrors/ti-linux-kernel
git fetch ti refs/heads/ti-linux-3.14.y 
git checkout ti-linux-3.14.y

Now we have latest version from ti-linux-3.14.y branch. Add our local GitLab server

git remote add gitlab ssh://path... 

And push current branch (we are on ti-linux-3.14.y after checkout)

git push -u gitlab

repo clean and repack

git reflog expire --expire=1.minute refs/heads/master
git fsck --unreachable      
git prune                   
git gc                

Debug

GIT_TRACE=1 git clone ...
GIT_CURL_VERBOSE=1 GIT_TRACE=1 git clone ...