Github is a Subversion control system See Wiki or Youtube . I’ll be brief and less descriptive cause it’s the basic commands . If i make a mistake or need to add some thing comment down below .
git config–global user.name “JohnDoe”
git config –global user.email “johnDoe@gmail.com”
git add *.java
git commit -m ‘ write a comment to tell what you changed’
git diff –cached
git commit -a -m ‘write a thing’ [ “a” is to skip the staging ie adding the files , it will add everything ]
git rm -f Delete.txt
git rm –cached DeleteMe.txt [to remove from staging area but it is going to be in the drive to check do git status]
git mv filename.txt fielnameChanged.txt [to rename then do git status to check ]
To see commit msg in reverse chronological order we use log .
git log –pretty=oneline [to see in one line]
git log –pretty = format: “%h:%an:%ar:%s” [press enter] [Format to see exactly how you see on the screen]
git log -p -2 [to see last to commit]
git log –since=1 week [last week commit ]
git log –since = “24-01-2014″
git log –author=”Rittamd” [press enter to c changes made by specific author]
git log –before = “24-01-2014”
To undo a commit .
git commit –amend
To decide to stage a file later you decide not to stage it ie :
git add Delete.txt [staged]
git reset HEAD Delete.txt [Not staged]
git status [press enter to c that Delete.txt is not ready to be committed]
git remote add origin https://github…../ABC.git
git push origin master
git remote -v
To get the data from remote (or the changed data) but not merge it to the local disk .
git fetch origin
for more visit here