git submodule update --init --recursive
-
-
Save sergiohidalgo/30c8a7552b9b3e3fedaf29dcd45789c4 to your computer and use it in GitHub Desktop.
git push origin $rama_actual
git reset --HARD $SHA1
git remote show origin
git fetch origin
git checkout --track -b $rama origin/$rama
git checkout -t origin/$rama
git branch -a
git checkout -b baremacion remotes/origin/baremacion #############################################
git branch $branch
git checkout -b $new_branch $other
git branch -d $branch
git push origin :$branch
git fetch -p git remote prune origin #############################################
git branch -m $nombre_rama_anterior $nombre_rama_nuevo
#############################################
Ignorar el salto de línea en Git http://help.github.com/line-endings/
git config --global core.autocrlf input
#############################################
git checkout $rama git cherry-pick $SHA1
#############################################
git tag
git tag -a v1.2 $SHA1
git push --tags
##############################################
git reset --soft HEAD~1
git revert HEAD
##############################################
Subir a la rama Commits parciales (los ficheros que no añado se quedan en el stash y se recuperan luego)
git add $file git commit -m "Mensaje" git stash git pull --rebase origin $rama git push origin rama git stash pop
git log origin/master..master
git branch -r --contains $commit
git reset --soft HEAD^
##############################################
git rebase -i HEAD~10 # Esto mira los 10 últimos
pick ce2b738 Commit message 1 pick 2a3cdf7 Commit message 2
git filter-branch --env-filter 'GIT_COMMITTER_DATE=$GIT_AUTHOR_DATE; export GIT_COMMITTER_DATE' ..HEAD
##############################################
http://www.bluemangolearning.com/blog/2009/03/recovering-from-a-disastrous-git-rebase-mistake/