the modified files need to be submitted before switching branches
1. Switch branches
Git checkout-b branchname to create a branch locally and switch to that branch
V. Merging of branches
1. Merge the Branch (Branchname) in development into the main branch (Otherbranchname)
First, the Branchname branch is switched to the Otherbranchname branch.
git checkout Origin/otherbranchname
Merge
Since yesterday began to look at the use of git, because many command-line operations in Windows compared to the pit father, but today after a lot of detours and finally completed the GIT local warehouse and Remote Warehouse Association, recorded as follows,First thanks to the http://www.liaoxuefeng.com/wiki/0013739516305929606dd18361248578c67b8067c8c017b000 of L
Catalogue [-]
Premise
Use process
Principle Analysis
Attention
Other
Reference articles
shede333Home: http://my.oschina.net/shede333 http://blog.sina.com.cn/u/1509658847Copyright Notice: Original article, copyright notice: Free Reprint-Non-commercial-non-derivative-maintain attribution | [Creative Commons by-nc-nd 3.0] []
PremiseIn general, we add remote libraries to
I. Conflict generation: Both local and remote have changed since the last git sync (upload)Two. Handling1. Discard local, using remote:Git checkout conflicting files and their pathssuch as: Git checkout bzrobot_navigation_meta_packages/map_server/src/access_map_server.cpp2. Man-made merge (git mergetool) local and
Git adds multiple URLs to the remote database, giturl. Git adds multiple url addresses to the remote library. the giturl Directory [-] uses the process principle for parsing. Note that Other can be found at: shede333 homepage: my. oschina. netshede333http: git adds multiple
'receive. denycurrentbranch' configuration variable
Remote: Error: 'ignore' or 'warn' in the remote repository to allow pushing
Remote: Error: Its Current branch; however, this is not recommended unless you
Remote: Error: arranged to update its work tree to match what you pushed in some
Git adds multiple url addresses to the remote database nbsp; Directory [-]. Note the principle of use process for parsing. For more information, see Other. author: shede333 homepage: my. oschina. netshede333 nbsp; amp; nbsp; blog.sina.com. cnu1509658847 copyright statement: original article, copyright statement: free reprint-non-commercial-non-derivative git
have several computers. If you submit them at the company and submit them at home later, you only need to add the keys of each computer to GitHub, you can push data to GitHub on each computer.
Finally, the Friendly reminder is that anyone can see the free Git repository hosted on GitHub (but only you can change it ). Therefore, do not include sensitive information.
If you don't want others to see the
, the public warehouse is free to use and a private warehouse is created for a fee.Four, Upload items to GitHubCopy the URL of the remote repository:Run the command "Git remote add origin remote warehouse URL"Run the command "Git
Start a new project by building a new library in an existing Git repository and uploading the local git repository to the remote server's Git repositoryfirst , create a new folder on the local ABC, enter into ABC, and then git init. This initializes a
Now, after you've created a git repository locally, you want to create a git repository on GitHub and synchronize the two warehouses remotely, so that the repository on GitHub can be used as a backup and other people to collaborate through the warehouse.First, log on to GitHub, and then, in the upper right corner, find the "Create a new Repo" button to create a new warehouse:In the repository name fill in l
: Error: Its Current branch; however, this is not recommended unless you
Remote: Error: arranged to update its work tree to match what you pushed in some
Remote: Error: Other way.
Remote: Error:
Remote: Error: to squelch this message and still keep the default behaviour, Set
Remote
clone a git clone URL from a remote repository (URL supports various protocols such as GIT,SSH,HTTP,HTTPS)
pull files from the remote repository Git pulls Origin master (git uses the name origin to identify the original
1, (first into the project folder) through the command gitinit this directory into git can manage the warehouseGit init2, add the file to the local repository, use the command git add file, add to staging area inside, if the next decimal point ".", meaning to
1: Apply git account to create warehouse, get remote warehouse address Https://github.com/****/****.git2: Enter the project root directory by command CD: ************3: Install the GIT environment, set environment variables4: Execute git command git status--View all file sta
", "SSH Keys" page:Then, click "Add SSH Key", fill in any title, paste the contents of the Id_rsa.pub file in the Key text box:After clicking "Add Key":Why does GitHub need SSH key? Because GitHub needs to recognize that your push submission is actually pushed by you, not someone else impersonating it, and Git supports the SSH protocol, so if GitHub knows your pu
Manage these remote repositories so thatPushOrPullData
Add remote database
Remove obsolete remote database
Manage various remote database branches
Define whether to track branches
View the current
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.