==== Ohhh did you FORGETS yeS? ====
save passwords for 10 hours
git config --global credential.helper cache
git config credential.helper 'cache --timeout=36000'
to see what branches exist and which one we are on
git branch -v
or after 2.7 (or change global page config)
git branch -v >> branches
cat branches
rm branches
git checkout branchname
create a branch from the current place
git checkout -b branchname
delete a remote branch NOTE: the ':' means delete, as it is copying from the left of the colons, which is nothing, to the branchname
git push origin :branchname
git branch -D branchname
git tag -a v0.1 -m 'init'
git tag -n
git tag -a v0.2 -m 'version 1.2' 9fceb02
to push your tags to the remote (origin not required)
git push origin --tags
git tag new old
git tag -d old
to take the remote version in a conflict
git checkout --theirs filename.php
git checkout HEAD filename.php
git reset --soft HEAD^
git reset ##number filename
git checkout stash filename
to add to a remote repo for the first time
git remote add origin https://[email protected] /project.git
git push -u origin --all
git remote set-url origin https://github.com/user/repo2.git
git remote -v
to merge something into the place we are at
git merge dev <- say if we are in master, then this will merge dev into here.
git submodule update --remote --recursive
git push --recurse-submodules=on-demand
git submodule update --init --remote submodule-path
git submodule add [email protected] /project.git submodule-path