Getting Started with Git
Linux is designed with a file system expert and kernel Designer's perspective, and its unique design gives git exceptional performance and optimized storage capabilities.
Install Git
Ubuntu Linux 10.10 or later
# apt-get Install git
#apt-get Install git-svn git-email Git-gui GITK
Ubuntu Linux 10.04 or lower version
# Apt-get Install Git-core
#apt-get Install Git-doc git-svn git-email Git-gui gitk
RHEL Fedora CentOS
# apt-get Install git
#apt-get Install Git-doc git-svn git-email Git-gui gitk
View git documentation
Under Linux, you can use the Man command to view the Help documentation for the command.
Submission and acquisition of source code
- To create a repository: Git init
The Git repository is divided into local and remote repositories, which can be disconnected from the Internet when using git to manage source code versions, using the local repository, connecting the local repository to the remote repository when connecting to the Internet, and not requiring any permissions to access the local repository. Anyone who wants to modify the source code in the GIT source managed server must use the git clone command to create a local repository that is identical to the remote repository.
You need to use GIT init to create an empty repository locally.
2. Submit file to local repository: git commit
Once the files in the working directory are submitted to the local repository, it is no longer feared that the source code will be mistakenly or incorrectly changed.
3. Create a local branch: Git branch
4. Switch local branch: Git checkout
5. Create an open source project on GitHub
6. Uploading source code to github:git push
7. Download source code from github: Git clone
Getting Started with Git