This article is a mirror article of machine translation, please click here to jump to the original article.

View: 7247|Reply: 0

Git in action – Commit your local project to github/gitlab

[Copy link]
Posted on 2/13/2017 12:38:17 PM | | |
This article is about one thing: converting a locally maintained project into a Git project and hosting it on GitHub.

In total, there are a few steps:

1. Open the command line terminal, go to the local directory where the project is located, and initialize the directory as a Git project


A .git hidden folder is created in the directory

2. Put all files into a new local git repository


If you already have a .gitignore file locally, it will filter the files that you don't need to add according to the existing rules. If you don't want to add all the files, you can add . symbol with a specific file name

3. Submit the added files to the repository


4. Visit GitHub

Sometimes you may have to climb over the wall

5. Create a new repository

To avoid conflicts, don't check the README and LICENSE options yet

6. On the generated project homepage, copy the warehouse address

Similar to https://github.com/superRaytin/alipay-app-ui.git

7. Go back to the command line terminal interface and associate the local repository with the remote repository


You can run the following command to view the results:


8. Submit the code to the GitHub repository







Previous:git push failed to push some refs to git
Next:Python multiple versions cause yum to run errors
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com