-
list local configs:
git config --list
-
create a branch:
git branch testing
, testing is the branch name -
point to a branch:
git checkout testing
git checkout master
-
create and point to a branch:
git checkout -b testing
-
list of current branches:
git branch
-
merge:
git checkout master
;git merge testing
-
delete a branch:
git branch -d testing
-
to point a local copy to a different url: git remote set-url origin
-
to revert all changes to be just like remote repository head:
git fetch origin
&&git reset --hard origin/master
-
to point local branch to different remote repo:
git remote set-url origin <the .git address>
-
to know the remote location the local copies are pointing:
git remote -v
-
checkout remote branch:
git checkout -b somexxx origin/SomeRefactorings
-
list current remote branches:
git branch -r
-
if git branch -r shows already deleted remote branches run
git fetch origin --prune
and then git branch -r back again -
git remote add upstream git@github.xxxx.xxx:xxx/original-repo-url.git
thengit remote -v
origin git@github.xxxx.xxx:gustavo-franke/original-repo-url.git (fetch)
origin git@github.xxxx.xxx:gustavo-franke/original-repo-url.git (push)
upstream git@github.xxxx.xxx:xxx/original-repo-url.git (fetch)
upstream git@github.xxxx.xxx:xxx/original-repo-url.git (push)
git fetch upstream
*
git checkout -b test <name of remote>/test
git checkout -t <name of remote>/test
git pull upstream development --rebase
git stash show -p stash@{1}