Git distributed version control learning, git version

Source: Internet
Author: User

Git distributed version control learning, git version

Both git and SVN are version control systems. Git is a command line operation. If you don't like it, forget it. If you are unwell, Please seek medical advice in time ~

Git WIN32 Baidu Network Disk: http://pan.baidu.com/s/1c1AeY9y

Not very familiar with, refer to: http://blog.jobbole.com/78960/ this website to learn the next, I feel pretty good to use, immediately share.

GitCommon commands are as follows:

Mkdir: XX (create an empty directory XX indicates the directory name)

Pwd: displays the path of the current directory.

Git init converts the current directory into a manageable git repository and generates a hidden. git file.

Git add XX adds the xx file to the temporary storage area.

Git commit-m "XX" refers to comments behind the commit file-m.

Git status view repository status

Git diff XX view XX File Modified those contents

Git log view history

Git reset-hard HEAD ^ Or git reset-hard HEAD ~ Roll back to the previous version

(If you want to roll back to version 100, use git reset-hard HEAD ~ 100)

Cat XX

Git reflog view the version number id of the History

Git checkout-XX removes all modifications to the XX file in the workspace.

Git rm XX Delete XX File

Git remote add origin https://github.com/wjf444128852/testGit associates with a remote Library

Git push-u (not required after-u is used for the first time) origin master pushes the current master branch to the remote database

Git clone https://github.com/wjf444128852/testGit clone from remote Library

Git checkout-B dev: Create the dev branch and switch to the dev branch.

Git branch: view all current branches

Git checkout master switch back to master Branch

Git merge dev combines dev branches on the current Branch

Git branch-d dev Delete dev branch

Git branch name: Create a branch

Git stash hides the current job and continues to work after it recovers from the site.

Git stash list view the list of all hidden files

Git stash apply restores hidden files, but the content is not deleted.

Git stash drop delete file

Git stash pop also deletes files while restoring files

Git remote view remote database information

Git remote-v: view detailed information about the remote database

Git push origin master Git will push the master branch to the remote branch corresponding to the remote Library

 

Related Article

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.