Either way, create a repository on Gethub and initialize it when you create it

If not, it will show you how to create a.md file from the Command line, which is why I got dizzy in the first place, and how to connect the local Gethub.

… or create a new repository on the command line

(Create a new repository from the command line)

echo “# four-test” >> README.md

This is basically a write statement, while creating a new readme. md file,

Echo “content” >> write to readme.md (I tried, if there is no such file he will create a new one.)

git init

In particular, this statement, which is an initialization statement, will generate a.get folder under the current file. Mainly used for version control. (The role of the specific file, I do not copy and paste, easily need not change the things inside), note: he is a hidden folder,

When this statement is finished, the folder is a repository ready to connect to, with $ls — al

To add the file you want, use add name below. To add the file you want, add. Add all. This is not yet connected to the specific library on your Gethub. (I think the first initialization didn’t specify a target.) git add README.md

Add files, as with SVN.

git commit -m "first commit"

Git commit -m git commit -m git commit -m git commit -m If you add amend information, you can use git commit — amend there are too many other commands, I also looked up, nothing. I don’t teach fish to swim.

git remote add origin <https://github.com/zidanpiaoguo/four-test.git>

This is remote synchronization local remote,

Origin is just a name. Match the URL to the name and simplify the rest.

At this point, the.git local files are mapped to your repository. (I am using

Git remote v = git remote v = git remote v

  git push -u origin master

This is a local push to the remote repository, and master is a master branch.

Here’s another way:

The first method is to CD to a directory and run get init first. The.get file is generated, in this order, to add items to the library.

The second method is to use git Clone URL, download the repository to the local, and then add and push