GIT - An Awesomeness - Features and Basic Commands
GIT, a simple command line tool, is a Source Code Management (SCM) system which has the feature of version control system that is an unique characteristic of GIT to manage large project done from different places and by different people.
Git is both the central and distributed version control system
Nicely controls the different versions of a project work
It is an open source project
Git is used both online and offline
It is fast process to response
Git is small in comparison to SVN
Branching with Git is cheap and Merging is easy
Basic Used Command of GIT:
Initializes the directory for git
Shows the present status of Git repository
git commit -m "file name"
Commits the staged file to the directory
Add files to stage area to be committed
Add origin directory to remote address
git push -u origin master
Push files to origin after modifications
Pulls files from remote place to local
Shows the difference from last commit to the pointer at HEAD
Shows the difference from parent commit to the pointer at HEAD
Shows the difference from last 2 commits to the pointer at HEAD
Shows the difference between parent commit to the pointer at HEAD
Shows the difference from last 5 commit to the pointer at HEAD
Shows the difference between the branches of master area
Shows the difference between the staged files
Resets the changes to the commit
git checkout -b <file_name/branch_name>
Create a branch and make it editable
Creates branch at the directory
Merges the branch to the master
git branch -d branch_name
Must delete the branch from local directory
git clone "file directory"
Clones the file from the remote directory to the local
git commit -am "file_name"
Automatically commits the all changes of the file
Shows the remote origin details/link
Removes the files and stages the all changes of removal
Shows the all tags or versions
git tag -a v.0.0.3 -m "version 0.0.3"
Adds the version created new
Pushes all the tags/versions
Shows the remote origins and the directories/links
Shows the history of that repository
git log --until=1.minute.ago
Shows the history from 1 minute ago
git log --since=1.day.ago
Shows the history from 1 day ago
git log --since=1.month.ago
Shows the history from 1 month ago
git log --until=2.weeks.ago
Show the history from 2 weeks ago
git log --since=2012.10.10 --until=2012.10.12
This shows the history of a certain time
git config --global user.name "name"
Configure the user name globally
git config --global user.email "email_ID"
Configure the user email ID globally
git config user.name "name"
Configure the user name locally
git config user.email "email_ID"
Configure the user email ID locally
Moves all the changes, all the commits to the temporary area for working temporarily
Undo last commit and all changes
git commit --amend -m "New Msg"
git push -u origin master
pushing files, origin=remote repository name, master=local branch to push
www.github.com, www.gitref.com. www.git-scm.com, www.wikipedia.org, www.stackoverflow.com