Difference between revisions of "Git reference"

From thelinuxwiki
Jump to: navigation, search
(Pushed from Themanclub.)
 
Line 1: Line 1:
 
git - distributed revision control system  
 
git - distributed revision control system  
  
'''4 main commands'''
+
create repositories by creating a directory for each project.  Once you are in the directory,
  
1. git pull ''project_name'' <<< update local code revision
+
# git init
  '''cd ~/src/droidpod'''
+
  get pull droidpod
+
  
2. git push ''project_name''
+
Adding Files to the Repository
         
+
git add *
3. git add ''src_code_filename''  <<< adds src code to commit queue
+
or
example:   
+
git add filename.txt
  git add DroidPod.java
+
     
+
4. git commit -m ''comment-about-commit''
+
  
 +
Committing Files
 +
The Git add command is normally followed immediately by the Git commit command.
 +
 +
committing creates a snapshot
 +
git commit -a -m "This is my commit message!"
  
 
[[category:programming]]
 
[[category:programming]]

Revision as of 22:07, 24 May 2013

git - distributed revision control system

create repositories by creating a directory for each project. Once you are in the directory,

# git init

Adding Files to the Repository

git add *

or

git add filename.txt

Committing Files The Git add command is normally followed immediately by the Git commit command.

committing creates a snapshot

git commit -a -m "This is my commit message!"