1. The git clone project to local
In the development of the people, the general project have the master and the other branch, so clone operation requires you to specify the corresponding branch the clone to local project,
1. The first to create a new empty folder, the folder to git initialization, under the root directories of the folders, right-click the git bash here, type the command in a pop-up window: git init
Thus this folder to git initialization the
2. The following is the clone operation, continue to type the command: git clone xx (git address) for your project, general this command clone is the master branch project, you can clone the specified engineering branch of command: git clone git - b branch name address
2. Use the git to local projects submitted to making
1. If the project does not have the git initialization, then the root directory of the project using the git init is initialized, if has been initialized, omit this step
2. The project file to add to the repository using git add, (git add.) add all files, (git add xx () of a specified file) said it would add specified file
3. The add file commit to warehouse, command: git commit -m "you want to write comments"
4. Will the local warehouse related to making, the command is as follows: git remote add origin XXX (in this case you git address)
Before 5. In a push to pull operation, the command is as follows: git pull origin XXX (for your branch name here, the master or other branch name)
6. Upload code to making remote warehouse, the command is as follows: git push -u origin XXX (in this case your branch name), in this step may have a pop-up window to enter your user name and password, you can be in accordance with the instructions
More than six steps is to make local projects submitted to the remote operation on making, submit it is also possible to use the git plug-in that related to the IDE to submit,
CodePudding user response:
CodePudding user response:
On is committed to making open source? If is the company's projects can't be uploaded on the lot, if only used in local Git still can realize the collaborative development?