git is a wonderful SCM, so is extremely important know about its right use. Spent some time reading the articles below contributes to a good code repository.
Start with github code school where you'll learn the basics commands for using git. If you want to understand in detail what each commands does read the official documentation
If you're not used to work with other or if you only use the master branch, checkout this git workflow, this is how we should work. When you understood how to work with branches checkout how to make them an ally in your delevopment
I'm the new git grand master, but I'm using commit messages like this
A good commit message should be self explanatory, it should describe the problem been solved and how it was solved. It's very important write good messages, so the history is human readable and doesn't requires code digging. Read this and click here if you want to know what a big opensource project recommends in terms of commit messages.
Remember to change parameters. Values listed here are just examples.
https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet
List remote repos URL:
git config --get remote.origin.url
Add a remote repos, list all remotes and fetch (update) branch list:
git remote add ophidia https://github.com/OphidiaBigData/ophidia-analytics-framework.git
git remote -v
git fetch ophidia
To see the list of branches:
git branch -a
Suppose devel
is the development branch and ophidia
is a remote repos and has a branch also named devel
:
git checkout devel
git pull ophidia devel
git push # send to remote