Application of Git under Windows (i)-Local warehouse code management

Source: Internet
Author: User

Visit https://gitforwindows.org/? Download an installation package, go all the way next

git config--global user.name "pcdog" git config--global user.email "[Email protected]"

CD D:

mkdir git

Create a Directory

Initialization

Git init

The database is generated in the. git directory.

I generate the current date 1.txt and commit to Git

Date>1.txt

Git 1.txt

New files found under scan

Add a comment and submit

The file time in the warehouse is 17:56

Files in file time is 17:56

Submit History

Restore the latest 17:56 commit record

File reverts to the status of the last commit 17:54

Use git Add. All files can be added

or join a directory

Look at the state

git status

You can see which files have changed.

Git diff

See only one file

git diff 1.txt

git checkout 1.txt fast rollback

Git log looks at history, but it's more convenient to have a git UI.

Git log-1-P

See what's been changed recently

Add Branch

Git branch version1.0

Switch branches

git checkout version1.0

Code Merge

git checkout master git merge version1.0

Delete Branch

Git branch-d version1.0

The local warehouse is basically playing.

Application of Git under Windows (i)-Local warehouse code management

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.