User Tools

Site Tools


git

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
git [2015/10/01 17:51]
heeryerate Create Git guide (not finished)
git [2015/10/28 11:28]
sertalpbilal removed
Line 1: Line 1:
-**A simple guide for Git.**+====== Git ====== 
  
 [[https://git-scm.com/|Git]] is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency. [[https://git-scm.com/|Git]] is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency.
Line 5: Line 6:
 [[https://git-scm.com/|Git]] is useful especially you are collaborating with others on developing software, maintaining exist project or writing a piece of paper. With help of git, you can easily and wisely finish your work without bothering on backup, update or recovery your gathering work.  [[https://git-scm.com/|Git]] is useful especially you are collaborating with others on developing software, maintaining exist project or writing a piece of paper. With help of git, you can easily and wisely finish your work without bothering on backup, update or recovery your gathering work. 
  
-Usually we could use simple git command line to use git nicely. You can either choose the following recommended apps to setup your git and use it.+Usually we could use simple ''git'' command line to use git nicely. You can either choose the following recommended apps to setup your git and use it.
  
 * [[https://code.google.com/p/git-osx-installer/downloads/list?can=3|OSX]]\\ * [[https://code.google.com/p/git-osx-installer/downloads/list?can=3|OSX]]\\
Line 11: Line 12:
 * [[http://git-scm.com/book/en/v2/Getting-Started-Installing-Git|Linux]] * [[http://git-scm.com/book/en/v2/Getting-Started-Installing-Git|Linux]]
  
-Here is a step-by-step guide for using git. +===== Step-by-step guide for using git ===== 
-Choose or select directory to be your local git repository + 
-''mkdir your_folder''\\ +1. Choose or select directory to be your local git repository 
-''cd your_foler''\\+<code bash> 
 +mkdir your_folder 
 +cd your_foler 
 +</code> 
 + 
 +2. Create a new repository in your_folder 
 +<code bash>git init</code>
  
-> Create new repository in your_folder +(Optional) You can also checkout (download) remote repository from [[https://github.com/|github]] 
-''git init''+<code bash>git clone /path/to/your_folder</code>
  
-> You can also checkout (download) a remote repository from [[https://github.com/|github]] +3When you propose some local changes, you should always add it 
-''git clone /path/to/your_folder''+<code bash>git add *</code> or <code bash>git add your_file_name</code>
  
-> When you propose some local changes, you should always add it +4. To be a mark on what you changed, you may need commit your change 
-''git add *'' or ''git add your_file_name''+<code bash>git commit -m "message"</code> example <code bash>git commit -m "add one theorem"</code>
  
-> To be a mark on what you changed, you may need commit your change +5. If you are working on a remote repository (e.g. Github, Bitbucket), you can push your changes by using 
-''git commit -m "message"'' example ''git commit -m "add one theorem"''+<code bash>git push</code>
  
 +FIXME You can change this step-by-step tutorial with an actual project example which could be downloaded from github.