cmdref.net - Command Reference

This site is command references for system engineers.

User Tools

Site Tools


Top     OS ( Linux )     Middleware     Protocol     Hardware     Programming ( Shell Script )     SiteMap

Sidebar

Top     SiteMap








Reference











.

middleware:version-control:git:index.html



Middleware

Git

summary

  • Git is a distributed revision control and source code management (SCM) system.
  • Git is a version control system (VCS) for tracking changes in computer files and coordinating work on those files among multiple people.

Web Sites

Companies & Projects Using Git

Google, facebook, Microsoft, twitter, Linux, eclipse




Command

Configuration

Command Explanation Example
git --version Disaplay git version
git config --list
git config user.name

Setting Up a Git Repository

Command Explanation Example
git init Create an empty Git repository or reinitialize an existing one git init --bare project1
git clone git clone project1 testclone


Daily Work

Command Explanation Example
git add Add file contents to the index git add test.txt
git add -p ← all files of changed
git add . ← new add and edit files
git add -u ← delete files, edit files, not new files
git add -all or git add -A ← both . and -u
git commit Record changes to the repository git commit -m “message”
git commit -a
git status Show the working tree status
git log Show commit logs git log
git log --oneline
git log --graph --decorate --oneline
git revert git revert HEAD
git reset
git clean Remove untracked files from the working tree git clean -n ← dispalay a deleting files.
git clean -df
git clean -xf







middleware/version-control/git/index.html.txt · Last modified: 2017/08/10 by admin