资讯

How do you connect a local Git repo to a remote repository your team has set up in GitHub, GitLab or Bitbucket? There are two ways to push a local project to a remote Git repo: the recommended way, ...
Now that you have your repository cloned to your local machine, add (or create) all the code you need for the repository into the new directory and issue the command: git add .
There are two parts to this, where you have a local Git repository, which you then push to a service like GitHub. To begin with, though, you need to set things up locally.
The second link above will fix that problem. Once the local repo is initialized and a remote is configured, you should be able to run git status, git diff, etc.
Only the git init command has the power to create a new Git repository. This simple version control tutorial shows you how to use the git init command.
Hosting your own code repository has many benefits, such as security and ease of use. Jack Wallen shows you how to deploy a local repository to your data center with Gogs.
GitHub is used for a variety of reasons, not least as a way to distribute your own code. One of the absolute basics is cloning a repository from GitHub to your local machine.