11/29/2023 0 Comments Gitkraken create branch![]() When we create a new branch, we must explicitly establish this connection. If you need to modify the default host of the branch, you can right-click the branch: The above command pushes the local master branch to the origin host, and at the same time specifies origin as the default host, then you can use git push without adding any parameters. # Here -u is the abbreviation of -set-upstream, use the -u option to specify a default branch, so that in the future push master branch can be used directly without any parameters using git push The corresponding git command is: git push -u origin master No need to fill in, just default the master directly and click submit to submit, so that the local master branch and the remote host origin establish a tracking relationship: Establish a tracking relationship between the local branch and the remote host Since the remote host does not have a branch, this is the first time to submit a branch, use push click on the toolbar push: The corresponding git command is: git remote add origin ĥ. Of course, you can change it to other ones, but origin allows others to look clear at a glance. Here my host name is "origin", which is Git's default wig. After completion, the local warehouse and the remote warehouse will be associated: After clicking Add, you will be asked to enter the password. Next, associate the two warehouses:įill in the host name and URL of the remote project. Add remote host Now the local warehouse and the remote warehouse are created, but they are not connected. $ git commit -m "Initial commit" # The submission information here is GitKraken defaultĤ. The corresponding git command is: $ git init Open GitKraken and log in with your GitHub account ![]() Create an empty project on GitHub, you can see that there are several initialization commands listed here:Ģ. Here use GitHub as the remote code hostingġ. The following describes the git commands corresponding to related operations on the following interface: Initialize a project The theme I set here is Light, and the default is Cool Black. Of course, it cannot be used for And to use, we should understand what the git command corresponds to each operation. I personally think that learning git commands from GUI graphical tools is the best for novices, and it is not easy to make mistakes. First of all, it is in English, which can make novices more familiar with git commands. Yesterday I found a cool git graphical tool on the Internet-GitKraken, and I used it initially. I just started to use the SourceTree graphical tool and found that this tool is not very useful on windows. I recently read some things about git workflow.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |