asotog
8/27/2013 - 4:35 PM

Common commands

Common commands

Cursor position

ALT + click

Removes all the .svn files from a versioned folder

find . -name .svn* -exec rm -rf {} \;

Clean

git checkout -- . removes unstaged files

git clean -df remove untracked files

git replace with head

git checkout --theirs filename.c

update branch with another branch

git fetch
git merge BRANCHNAME

sync git repo

git remote add NAME (url repo)
git checkout master
git fetch NAME
git merge NAME/master

reset branch from remote & discards branch changes

git fetch upstream
git reset --hard upstream/master

list remotes repos

git remote --v

unstage commit in local machine

git reset --soft HEAD^

join commits 9 is the number of commits to join into single one, remember to update new commit message git rebase --interactive HEAD~9