Mini tutorial emphasizing uses in multidisciplinary projects! Git/github is not just for coders!
*If you also love git and are trying to get your team to use it, feel free to contribute!
###Windows The first and most important thing you have to ask yourself is: Why, why, why am I still in Windows?
The second thing to ask yourself is: Why do I keep doing this to myself?
If you choose not to hear this advice, here's what you gotta do to have git on Windows.
###Linux
####Fedora
$ yum install git-core####Debian
$ apt-get install git###Mac Hahaha you spent a LOT of money! Don't be so fresa.
Did you see how easy it was for Linux users? There are two ways for you:
- Via the git installer
- With MacPorts installed:
$ sudo port install git-core +svn +doc +bash_completion +gitwebGit (or github) is, in my opinion, a pretty awesome way to work in teams because it facilitates sharing and integrating work and it makes everyone accountable for the tasks that are assigned to them.
For the second reason, you have to tell github who you are:
$ git config --global user.name "Your Name"
$ git config --global user.email "your_email@whatever.com"
Once you do this, everything that you upload/update/do will have your name attached in the history of your repo (accountability FTW!)
One last thing...
If on a Mac also add:
$ git config --global core.autocrlf input
$ git config --global core.safecrlf true
If on Windows also add:
$ git config --global core.autocrlf true
$ git config --global core.safecrlf true
This will setup line ending preferences.
You can also tell git which editor you prefer (obviously, my example is with emacs but you plug in your favourite!)
$ git config --global core.editor emacs
Lastly, for resolving merge conflicts, you can setup where you want to do it!
$ git config --global merge.tool emerge
Let's check out our setup:
$ git config --list
No one (and I mean no one) knows everything. Knowing how to access the documentation is always your best bet.
To access git's manpage just do:
$ git help <verb>
$ git <verb> --help
$ man git-<verb>
where refers to any command you want! (If you know not any command, ask Google what you wanna do and start checking out all the possibilities to make your life easier!)
To write beautiful stuff (like this document), use Markdown! It really is awesome.
For an amazing cheatsheet
Incidentally, you can easily turn a markdown file into a presentation! For those RStudio users, checkout this one
If you find this useful, want to contribute or whatever, don't be a stranger! Drop us a line.