How To Use Git: Difference between revisions
From Genome Analysis Wiki
Jump to navigationJump to search
No edit summary |
No edit summary |
||
| (3 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
= Learning Git = | = Learning Git = | ||
== Presentations == | == Presentations == | ||
| Line 21: | Line 19: | ||
= Git | = Git Terms = | ||
* Repository - holds files and their history | |||
** Bare repository - no visible files, just the database that holds the stored information | |||
* Clone - copy a repository | |||
* Local/working - the directory/repository where you make your changes/work in | |||
* Remote/source - the repository that your local/working repository was cloned from/where you send your completed changes. | |||
* Commit - a version/revision of your repository or the act of creating a version/revision | |||
** on a commit, changes are only stored in the local/working repository | |||
* Pull - update your local/working repository with any changes that have been made to the remote/source (you do not automatically see the changes) | |||
* Push - update the remote/source with changes that you have made in your local/working repository | |||
* Branch - alternate paths of work that allows you to commit/push/pull without affecting the other paths | |||
* Master - the main/default branch | |||
* Merge - bring in changes from another branch | |||
= Some common global setup = | |||
* global setup options are stored in ~/.gitconfig | |||
* each repository may have additional config options | |||
* source for the following options is [http://git.or.cz/course/svn.html here] | |||
* git config --global user.name "Your Name Comes Here" | |||
* git config --global user.email you@yourdomain.example.com | |||
* git config --global color.diff auto | |||
* git config --global color.status auto | |||
* git config --global color.branch auto | |||
= [[Git FAQs]] = | |||
Latest revision as of 16:58, 9 September 2011
Learning Git
Presentations
- Just the Basics
- Tags & Branches
- Needed for making changes without affecting others
- Useful for marking releases
If you want to use a GUI, one option is: SmartGit GUI
Practical
Cheat Sheet
GitHub
We use GitHub to host our software repositories - take a look at a brief overview
Git Terms
- Repository - holds files and their history
- Bare repository - no visible files, just the database that holds the stored information
- Clone - copy a repository
- Local/working - the directory/repository where you make your changes/work in
- Remote/source - the repository that your local/working repository was cloned from/where you send your completed changes.
- Commit - a version/revision of your repository or the act of creating a version/revision
- on a commit, changes are only stored in the local/working repository
- Pull - update your local/working repository with any changes that have been made to the remote/source (you do not automatically see the changes)
- Push - update the remote/source with changes that you have made in your local/working repository
- Branch - alternate paths of work that allows you to commit/push/pull without affecting the other paths
- Master - the main/default branch
- Merge - bring in changes from another branch
Some common global setup
- global setup options are stored in ~/.gitconfig
- each repository may have additional config options
- source for the following options is here
- git config --global user.name "Your Name Comes Here"
- git config --global user.email you@yourdomain.example.com
- git config --global color.diff auto
- git config --global color.status auto
- git config --global color.branch auto