Introduction to the installation and use of Git on Linux, gitlinux installation introduction _php tutorial

Source: Internet
Author: User
Tags using git

Introduction to the installation and use of Git on Linux, Gitlinux installation introduction


Introduction to git Installation and usage on Linux unzip and switch to its directory $ tar xvfj git-1.7.6.tar.bz2$ cd git-1.7.6install using the default configuration, if you want to modify the configuration, you can use the./configure--help to get assistance $./configure$ make$ make install2, initialize configuration git is installed by default in/usr/local/bin, after installation, you can verify that the $ Whereis gitgit is installed.:/usr/local/bin/git$ git--versiongit version1.7.6$ git--Help first needs to specify user name and email address $ git config--GlobalUser.name "git Admin" $ git config--GlobalUser.emal Obugs.net@gmail.com re-verify configuration information www.2cto.com $ git config--ListUser. name=GIT Adminuser. Email=obugs.net@gmail.Comcore. repositoryformatversion=0Core. filemode=trueCore. bare=falseCore. logallrefupdates=trueIn fact, these configurations are stored in the personal home directory.gitconfig files in the $ cat~/.Gitconfig[user]name=GIT AdminEmail= Obugs.net@gmail.com3, any directory that establishes the local storage for the project can build a git project if an existing project is located in/home/obugs/projects/orangebugs directory, you can define this directory as a git project $ cd/home/obugs/projects/orangebugs$ git initinitializedEmptyGit Repository in/home/obugs/projects/orangebugs/.git/This establishes a name for the.git folder, which is the folder that Git uses to store information and track changes. www.2cto.com $ ls-altr.Gittotal40DRWXRWXR-x 4 git git 4096 13 22:39REFSDRWXRWXR-x 4 git git 4096 13 22:39OBJECTSDRWXRWXR-X 2 git git 4096 13 22:39INFODRWXRWXR-X 2 git git 4096 13 22:39Hooks-rw-rw-r--1 git git 13 22:39HEAD-rw-rw-r--1 git git 13 22:39Description-rw-rw-r--1 git git 13 22:39CONFIGDRWXRWXR-X 2 git git 4096 13 22:39BRANCHESDRWXRWXR-X, git git 4096 13 22:39.DRWXRWXR-X 7 git git 4096 13 22:39. 4, add and submit files to your project these actions and CVS, SVN, and so on are similar to git add*.java *.C $ git commit-m ' Initial upload of the project ' Create mode100755 orangebugs.javacreate Mode100755 Pwm/ui/datamanager.javacreate Mode100755 Pwm/ui/passwordframe.javacreate Mode100755 pwm/tools/strongencryption.javacreate Mode100755 Pwm/tools/passwordstrength.Java..Note If you have not previously specified a user name and email address using git config, you will get an error $ git commit-M ' Initial upload of the project ' Please tell me who is you. www.2cto.com Run git config--global user.email "you@example.com" git config--global user.name "Your name" to set Your Account ' s default identity. Omit--global to set the identity of the This repository. Fatal:empty ident not allowed 5, change files and commit changes to edit files, add or remove some fields $ vi Orangebugs.java view and files in Git repository compared to those that were changed $ git diffdiff--git A/orangebugs.java B/orangebugs.javaindex 6166ed1. Fd82d32 100644-a/orangebugs.java+++ b/orangebugs.java@@ -2,7 +2,7 @@-public counter=10+ public counter=55 if you want to submit, you need to ensure that the text The staging area can then be submitted, the default editor of the system will open automatically when submitted, and when the user adds some comments to save and exit the editor, the comments are submitted to the repository at the same time. www.2cto.com $ git add orangebugs.java$ git commit[master 80f10a9] Added password strength meter functionality1 files changed, insertions (+), 7 deletions (-) or, the simple way is to use Git commit-a to combine the above two commands. 6. View status and view comments if there are no changes to the local file compared to the files on the remote Git repository, the $ git status# on branch masternothing to commit (working directory clean) If local changes are made Dynamic but not committed, then $ git status# on branch master# changes not STAGed for commit:# (use "git add ..." To update what'll be committed) # (use "Git checkout-..." to discard changes in working directory) # # Modified:orangebugs.java#no changes added to commit (using "git add" and/or "Git commit-a") In addition, you can use the following command to view the file calendar  History and previous comments $ git log orangebugs.javacommit c919ced7f42f4bc06d563c1a1eaa107f2b2420d5author:git Admin www.2cto.com Date:sat 22:54:57 2011-0700 Added Password strength meter functionality commit C141b7bdbff429de35e36bafb2e43edc655e9957aut Hor:git admindate:sat 20:08:02 2011-0700 Initial upload of the project

Linux under Version management Git installation method, installation package, and detailed usage introduction, high score Xie

Google a little bit everywhere
If you use Ubuntu, play sudo apt-get install git on the terminal and install it.
Use arch words to play sudo pacman-s git
All kinds of package management should be able to see what kind of you use
The code itself is compiled into
Use the words one or two words don't tell me to go to Google Tutorial

Linux, Ubuntu using git issues how do I get git to record my version?

Implemented with a branch or tag, but it looks like the label should be more appropriate

http://www.bkjia.com/PHPjc/847128.html www.bkjia.com true http://www.bkjia.com/PHPjc/847128.html techarticle Introduction to the installation and use of Git on Linux, gitlinux installation introduction git on Linux installation and usage profile unzip after you switch to its directory $ tar xvfj git-1.7.6.tar. bz2$ CD git-1.7.6 Use the default ...

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.