Third, create a project in the cloud platform code
-
The main use github (most mainstream)
-
Slow-country visit
-
Private fee-hosting
-
-
General domestic use code cloud gitee
-
Domestic access speed
-
Hosted private items free (limit the number of developers)
-
-
The company used to build gitlab or svn
To create a
1. License cloud account registration
2. Create a warehouse
-
After logging cloud code by "+" the upper right corner of the site, select "New Warehouse" page to enter the new warehouse
2. Fill in the information warehouse
3.
ssh-keygen -t rsa -C '[email protected]'
cat ~/.ssh/id_rsa.pub
# ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC6eNtGpNGwstc....
4. Cloning into the local project
I git clone [email protected]: Tmclr of / django2.git
5. Add a remote repository
If it is the first established in the local project, and then create a remote repository in the cloud on the code, then the operation is as follows.
-
cd ~/project/tzporject git init
- Then add a remote repository
git remote add origin [email protected]:wcflove/tztz.git
Manual synchronization code (more secure), and then run django service, check and correct after you can submit code, then push the code to the cloud
-
Write .gitignore file
To make git run faster, some do not need to add to the repository of documents such pycharm project settings file .idea folders can be set to ignore .idea folder by .gitignore file, at the end of the file add the following .gitignore two lines
.... # pycharm .idea/
- Configured to push people's identity information (fill in your name and email address)
$ git config user.name "Tmclri" $ git config user.email "[email protected]"
- The code is pushed to a local warehouse
# Workspace added to the staging area $ git add. Submit to the warehouse staging area # $ git the commit -m ' Project the init '
- Cloud push code symbol
$ git push origin master
Note that if there is, you need to push fails to run strong push
$ git push -f origin master
Code clouds appeared, the code you write this