assuming you have code in a directory called hayate
cd /path/to/hayate
git init
git remote add origin git@hostname.com:hayate.git
git add .
git commit -a -m 'added hayate repo'
git push origin master:refs/heads/master
which creates the master branchgit tag v1.0 -m 'my first tag'
git push --tags
git tag -l
git clone git@hostname.com:hayate.git .
<- note the dot (hayate directory will not be created)git branch -l
lists local branchesgit checkout <branch-name>
switches working branch to "branch-name"git reset <file-or-directory-name>
git submodule add <repo-url> <local-path>
git submodule add git@hostname.com:hayate.git hayate
git submodule update --init
git checkout -b <branch_name>
git push -u origin <branch_name>
git checkout <branch_name>
to switch to the new branchgit checkout --track -b <local name> origin/<remote name>
git push origin --delete <branch_name>
git branch -D <branch_name>
git revert -m 1 merge_hash
warning: You did not specify any refspecs to push, and the current remote
warning: has not configured any push refspecs. The default action in this
warning: case is to push all matching refspecs, that is, all branches
warning: that exist both locally and remotely will be updated. This may
warning: not necessarily be what you want to happen.
warning:
warning: You can specify what action you want to take in this case, and
warning: avoid seeing this message again, by configuring 'push.default' to:
warning: 'nothing' : Do not push anything
warning: 'matching' : Push all matching branches (default)
warning: 'tracking' : Push the current branch to whatever it is tracking
warning: 'current' : Push the current branch
git config [--global] push.default current
(--global is optional)