Objectives:
Http://www.adaiw.com /? P = 611
Use a git repository to manage multiple branches and release multiple versions. The main logic of these versions is one to one, and the functional appearance is slightly different.
The command is as follows:
New a branch:
$git checkout HEAD -b newBranch
Push to remote:
$git p
1, first of all we recall two commands#git Remote Add origin repository link#git Push-u Origin MasterLet's take a look at this command, git is a git command, push is the download,-u should use the account to verify that Maser is t
Delete remote BranchGit push Origin -- delete View local branchesGit BranchCreate a local branchGit branch View All branches (local + Remote)Git branch-Delete local branchGit Branch -- delete Switch BranchGit checkout Create a new branch
In the beginning, I did not add the. Classpath in the GIT project to the. Gitignore, causing the file to persist in the remote branch so that when executing git pull on another machine, the local. Classpath is corrupted and the reference to the project is problematic. Thus, we need to remove the. classpath file from the remote
There are two ways of creating a new remote branch:Mode one: command line git push Origin Branch-name is the name of the remote branch you want to create. You can use Git bash or terminal in Android studio to hit the command line.Way two: Directly through the Android studio
--global user.email "[Email protected]"7. Submit ChangesUse the command git add * to commit all changes to the cache (local), waiting to be sentUse the command git commit-m "Modify information" to submit the changes to head (local) and describe what modifications were made8. Commit changes to the remote serverUse the command git to push
Environment: vs2013 + code cloud (https://git.oschina.net /)Error description:When you use git in vs2013 to publish the master branch of the solution,"The local branch Master cannot be published to the remote repository origin because a branch with the same name already exis
If you want to check the code of a previous version during development, first check the log
Git logcommit commit: Eric
Then we checkout a version
Git checkout f224a720b8192165a4e70f2564e42859964bebbb
If a problem is found, we changed it. Then we commit and push, but the server does not have the information we submitted because we are on a new branch.
View
I found a lot of online materials, usually
Git push origin: branch_you_want_to_delete
I use it like this.
Git push origin: GH-pagesSSH: connect to host origin port 22: Connection timed outFatal: the remote end hung up unexpectedly
Why cannot I delete a remote
There is a git branch–a used to view all the branches, both local and remote, in the commands you often use. But for a long time you will find that some of the branches have been deleted in the remote, but you can still see the deleted branches in your local area. You can use the command, GIT remote show origin to see
Your branch is ahead of ' origin/xx ' by 1 commitIndicates that the local commit has not yet been submitted to the Central service.To view remote branch conditionsGit branch–aCommit a local commit to a remote servergit pushAttention:It is to commit the log of the current branch
Tags: style blog color os data div log SP onWrote a script, timed to the database to take the schema, and pushed to the company's git.#daily_schema. py#/usr/bin/env pythonImportOSImportDatetime,timeos.system ('mkdir-p/tmp/schema') Tmp_now=Datetime.datetime.now () now=tmp_now.strftime ("%y-%m-%d") Os.system ("pg_dump-u postgres class4_pr-s-T ' cdr_report '-t ' cdr_report_detail '-t ' client_cdr '-t ' cdr_report20* '-t ' cdr_rep ort_detail20* '-t ' clie
Today, an error occurred while using git to push local code to the remote server:
whl@whl-desktop:/work2/recvdsrc$ git push Origin master klha@klha.net ' s password:counting objects:44, done.
Compressing objects:100% (24/24), done.
Writing objects:100% (25/25), 13.10 KiB, done. Total (delta), reused 0 (Delta 0) remote:error:refusing to update checked out Branch:
Local code merge to Dev branchSubmit in local branchgit Add.Git commit-m "Playbuy"Switch to Dev Branchgit checkout DevGit pullMerging branchesGit merge local (dev merge to the HF branch, the need to add-noff parameters, is to prevent first to merge the policy, do not need the next step git rebase, because Dev and HF belong to the online version, need to preserve the empty merge version to know the merged no
1. Fatal: ' Origin ' does not appear to be a git repositoryFatal:could not read from remote repository.Please make sure the correct access rights and the repository exists.Translation: fatal: "origin" is not a git repositoryFatal: Unable to read remote repositoryMake sure you have the right access rights and store inve
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.