Fonte: My Git Workflow (fluxo básico)
git log --oneline --graph --decorate --all
ou ainda melhor:
tig --all
git rm --cached -r .
git reset --hard
git reset --hard origin/mybranch
git clean -f -d
git checkout origin/master -- myfile.txt
git checkout -- .
git reset --soft HEAD^
git reset HEAD^
# HEAD^ means the first parent of the tip of the current branch.
# HEAD~ means the first parent of the tip of the current branch.
git reset --hard HEAD^
sudo apt-get install zsh
sudo apt-get install git-core
sudo wget https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O - | zsh
chsh -s `which zsh`
sudo shutdown -r 0
cd /path/to/my/repo
git init
git remote add origin <url do repositório>
git pull origin master
git push origin master
git branch -a
git checkout -b experimental origin/experimental
Só para olhar:
git checkout origin/experimental
https://rtyley.github.io/bfg-repo-cleaner/
http://robinlovelace.net/r/2014/06/25/pruning-a-giant-gh-repo.html
cd /tmp
git clone --mirror git://example.com/some-big-repo.git
java -jar bfg.jar --strip-blobs-bigger-than 100M some-big-repo.git
cd some-big-repo.git
git reflog expire --expire=now --all && git gc --prune=now --aggressive
git push
cd ..
rm -rf
some-big-repo.git
git rev-list --objects --all | sort -k 2 > allfileshas.txt
git gc && git verify-pack -v .git/objects/pack/pack-*.idx | egrep "^\w+ blob\W+[0-9]+ [0-9]+ [0-9]+$" | sort -k 3 -n -r > bigobjects.txt
for SHA in `cut -f 1 -d\ < bigobjects.txt`; do
echo $(grep $SHA bigobjects.txt) $(grep $SHA allfileshas.txt) | awk '{print $1,$3,$7}' >> bigtosmall.txt
done;
git add -u
git rm --cached <file>