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. -m
parameters 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