How local projects under the Windows Development platform use GIT management

Source: Internet
Author: User
Tags svn update

As the primary scenario for Git, introduce this excellent version control tool in the simplest way, typically:


There is a local project, such as the name "Hellopro", because we need to share the code, co-development, so we need to use GitHub or other servers to host the Git library.


Here are just the simplest things to do in Windows, so the tips for some operations may not be visible, and advanced use bash.


1.init

The easiest way to get to the project folder: Right-click Git Init here

After the operation is complete, the right-click menu appears Git Add all files now and so on


2. Add

This step involves adding a new project to the index library, which is the simplest way to run the command before each commit: Right-click Git Add All Files now

After the operation is complete, there is no change, but it has succeeded, and if you can see the details from the command line.


3. Commit

This step is to submit a new file or a change file to the warehouse (not a remote repository), you need to run the command before each commit, the simplest way: right-click Git Bash

Run

git commit- M"submitted descriptive information"This step uses the command line, which is simpler than using the GUI.


4. Setting up a remote repository

GitHub, for example, open GitHub, click New to create a new warehouse, and we recommend creating a. gitignore file at the same time. Not detailed.


5. Connect to the remote repository

The goal of this step is to connect the local git library to the remote Git repository for updates and uploads, which is just as simple as git init when the library is built, the simplest way: right-click Git Bash

Run

git remote add origin https://github.com/your user name/project name

6. Update from the remote repository

This step will be used frequently in the future development process, like the SVN update, the simplest way: right-click Git Bash Run

git pull Origin master


7. Upload the project file

This step will be used frequently in the future development process, like SVN commit, the simplest way: right-click Git Bash Run

git push Origin master
You will be prompted to enter your account password


At this point, log in to the remote repository to check if the file was uploaded successfully.

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.