Use git Bash to submit code to GitHub under Windows

Source: Internet
Author: User

Before uploading the code to GitHub is mainly through the client GitHub desktop or Web page, after changing the computer to feel the installation of the client is too troublesome, the way to know the command line is very necessary.

The experiment here is to commit some code changes to the Json.git repository.

"LS" is a Linux command that is used to view files and folders in the current directory.

The GIT init command is used to initialize the current directory so that the current Project-name directory is managed by Git.

The git add command allows you to add traces to the specified file. If followed by a space dot ".", it means that all files in the current directory are tracked.

"Git remote add origin [email protected]:d Efnngj/project-name.git"

If you are submitting your project for the first time, this sentence is very important, and it will establish a connection between the local project and the remote repository. Here choose the SSH protocol mode to connect.

To avoid conflict we should form a good habit of pulling the latest code on the server to local before each push.

The "git commit" command submits files (files managed by git add) to the local repository. -mparameters to describe the present submission. Generally submitted descriptions are essential to facilitate traceability of changes made to each submission.

"Git push-u Origin master" submits the local project to the remote repository.

Use git Bash to submit code to GitHub under Windows

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.