Wiki
Clone wikiVIT-Projects / git
Basic Git Setup
Global Setup
Before any git activities can be done on a machine you need to "introduce yourself" give your name and email to git.
$ git config --global user.email "yourname@youraddress"
$ git config --global user.name "FName LName"
In addition it is also important that we are setup to guard against CRLF headaches
Repo Setup
Once above is done you need to have a repo. This typically is done in one of two ways: clone or create.
Clone
One typically makes a git repo copy from some on bitbucket or github using git clone <repo-url>
Create
To create:
- cd into an existing codebase
$ git init
- Pre-Init setup (see below)
$ git add .
$ git commit -m "Initial Commit
Pre-Init Setup
Consists of creating files .gitignore
.gitattributes
and any other repo-config. More details: CRLF Headaches
Help
$ git help topic
will give help on topic.
$ git help -w topic
may be preferable.
For that yout need to $ apt-get install git-doc
More Advanced/Arcane
Merge vs Rebase
https://medium.com/@porteneuve/getting-solid-at-git-rebase-vs-merge-4fa1a48c53aa
Cleanup a repo
Hg Git Rosetta Stone
https://github.com/sympy/sympy/wiki/Git-hg-rosetta-stone#git__hg_conversion
Updated