Use the git branch-a command to view all local and remote branches (git branch-r can view only remote branches)Found that many of the branches that have been deleted in the remote repository are still visible locally.
Master Branch and Dev branch already on GitHubOn a localgit checkout-b dev new and switch to local dev branchGit pull Origin dev local branch associated with remote branch===========================================================
When clone finishes the repository and switches to the development branch, a hint appears after using Git pull-r to pull and merge branches:$ git pull-rFrom Ssh://192.168.1.226:29418/ethank-serverBc86d14. B72fc88 Dev-and Origin/devThere is no tracking information for the current branch.Please specify which branch the w
branchTo create a branch:git branch To switch branches:git checkout Create + switch Branches:git checkout -b Merge a branch to the current branch:git merge To delete a branch:git branch -d Resolve ConflictsLife is not as good as ten, and merging branches is often not smooth
* [New branch] master - > Temp
Git fetch Origin master:temp This command means: Download from the master branch of the remote Origin repository to local and create a new
In Android Studio, how does Git update the local remote branch list ?, Androidgit
For example, if your colleague adds branch xxx in Git's remote branch, but you find that when you view the existing branch in Android Studio, you ca
Sometimes you need to get the code for a remote branch from a remote git server, and the command is git fetch Origin remote-branch:local-branch, which is easier to forget, especially recorded.1. View Remote repositoriesGit remote-voriginhttp://git.dev.qianmi.com/elifeapp/weidian.git (Fetch) Originhttp://git.dev.qianmi.
Sometimes you need to get the code for a remote branch from a remote git server, and the command is GIT fetch Origin remote-branch:local-branch, which is easier to forget, especially recorded.
1. View Remote repositories
There are 2 commands in git that get the latest version from the remote branch to the Local:
git fetch: The equivalent of getting the latest version from remote to local, not automatically merge
Git fetch origin master
, with the git status view workspace, it's clean (unless you have a file that's not managed by git), so you can safely create a branch to fix the bug.First determine which branch to fix the bug on, assuming that you need to master fix it on the
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:
and provide relevant evidence. A staff member will contact you within 5 working days.