Windows, such as d:/code/, the server SSH user is Admin,ip 192.168.1.100, then the command is git remote add Origin ssh://admin@192.168.1.100d :/code/)
If you are prompted to indicate that Origin already exists, that is, "fatal:remote origin already exists", use the GIT Remote RM Origin command to delete origin, delete and re-execute git remote add Origin to ass
1. delete a local branch:Git branch-D branchname2. delete a remote Branch:// Method 1: Push the local branch to a remote location (the remote branch to be deleted has a ing locally) git
, git associates the local master branch with the remote Master Branch, and we no longer need to add the-u parameter to the push operation.If something like the following appears:Username for ' https://github.com ': shiren1118Password for ' https://[email protected] ':To Https://github.com/shiren1118/iOS_code_agile.git
Tags: Select remote Branch Code ENC Click and clip eclips throughCreate a personal local feature branch and encode itPop-up the Select Branch window and select the personal features branch you want to toggle (Note: Create local pe
the key (there are steps below), the target folder is C:\Users\Administrator\.ssh, the contents of the id_rsa.pub copied out to paste in our project SSH keys settings
and copy the config file of the project group to C:\USERS\ADMINISTRATOR\.SSH so that the project of remote repository can be obtained locally using Git clone.
Configure the above, you can set up a local folder to hold the project will
git mistakenly commits a file that you do not want to commit, and the method you want to remove from the repository
Example: Remove Lunch_history from the repository
Git filter-branch–tree-filter "rm-f lunch_history" HEADWill output the following information:Rewrite 48A237
remote.PostScript: At present, the understanding of Git is this, the study is very preliminary, after the new study will be updated blog. In this part, the emergence of the public key is not very clear, to be strengthened, look at the blog, but also see the "Master branch" These, have not been to delve into, are learning the space"Refer to some very good blogs: 51490480Https://www.cnblogs.com/xiangyangzhu/
Use git to download the project and deploy it on the local and remote servers.1. Configure Git1. download and install 2. After installation, right-click the desktop and select three more branches.
3. git clone code from git: 1> specify the url and directory (usually a workspace). If
Git initialization consists of two ways: direct initialization locally, initial with clone and checkout remote remote repository, and this section discusses the former first.Initialize git locally, using the GIT init command[Email protected]~$ mkdir studygit[email protected]~$ cd studygit[email protected]$ git initinit
There are two ways to associate a remote repository with a git local repository: 1. Clone the remote code to a local warehouse 2. Associating local code to a remote repository
1.git Clone Existing project (HTTPS | SSH) SSH: Check if your computer has a key to Id_rsa id_rsa.p
I wrote an article about http://blog.csdn.net/commshare/article/details/20526369 before.
The feeling is still not clear, so today again tried several times, summed up as follows:
1. Build the remote warehouse first
Distal:
Git--bare init
It's OK.
Attention
after joining the--bare, don't add a new file directly to the Git directory, and don't push it.
Otherwise there will be an error:
Fatal:this operat
The specific method is as followsGit pull Origin branch // error occurred git stash // Restore git stash ClearDevelopers often encounter this situation: It took a few days to do a new function, has changed almost more than 10 files, suddenly a bug needs to be resolved urgently, and then to a build test group. It's often time-consuming and error-prone to rely on
1. Create a new warehouse under your GitHub account--------get the GitHub warehouse address2. Install git locally---Right click on git Bash under the folder you want to clone3. Enter the command$ git clone "warehouse address"----Warehouse cloned to Local$ git Status---------
The project uses SVN more, so everyone is focused on how to use SVN on Xcode.Configuring SVN is, of course, simple, but commits will default to the GIT submission window, otherwise it will be submitted to the repositories interface. At present, there is no better way to do two processing: 1. Remove the corresponding git-related items directory in repositories (se
, if not successful, you will Google the error of the newspaper.When you're successfully, let's set up your github login and login mailbox in git config to execute the following two commands:git config--global user.name "Your name"git config--global user.email "[email protected]"Now we can upload the code!!Pull your project code into this folder, execute the command, gi
Previously on the machine using git to download the Linux git version of the source code, because in the process of reading the source code, the local files will inevitably be modified, so that the local file and the file version on the server is inconsistent, I want to do is to use the version of the server to forcibl
Absrtact: As the No-fast-forward push is rejected during git push, how to solve the problem of git push failure. There are three ways to form the submission history of the merge form, the linear form of submission history, covering the original submission history.
This article comes from: three modes of Git push
Address: http://blog.csdn.net/trochiluses/article/
Abstract: Because No-fast-forward push is rejected during git push, how to resolve the problem of Git push failure. There are three methods that will form the merge form of the commit history, the linear form of the commit history, covering the original commit history.
This article source: Three modes of Git push
Address: http://blog.csdn.net/trochiluses/article
the modified file to the directory you want to upload) in the version control bar you will see the code we need to submit2) Right-click Project Git commit dictory Normal commit modified code3) Commit Changges interface We choose commit and push (because commit only commits to the local, push is committed to the remote server)4) in the push commits interface we click Define remote (because we do not have th
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.