remote-branch

How to share a git feature (or topic) branch with multiple developers

♀尐吖头ヾ 提交于 2019-12-08 23:29:16
问题 I'm following the the workflow described here, as I found many references pointing to this page as a good workflow. As mentioned in the article, "feature" branches are shared between developers, but do not go to the central repository. Let's say a developer "A" starts a new feature branch with git checkout -b newfeature develop . Now let's say that developer "B" needs also to work on this feature. This is my problem. What I did: developer "B" adds developer A's machine as a remote developer

Git pull gives conflicts with octopus strategy

浪尽此生 提交于 2019-12-07 07:56:39
问题 Lately when I run git pull in my master branch it occasionally gives the following merge error: Trying simple merge with 7ff9b5... Trying simple merge with 6872cd... Simple merge did not work, trying automatic merge. Auto-merging file.txt ERROR: content conflict in file.txt fatal: merge program failed Automated merge did not work. Should not be doing an Octopus. Merge with strategy octopus failed. However after this merge attempt there are files that aren't even in the master branch. I can

How can I convert all the remote branches in a local git repo into local tracking branches

帅比萌擦擦* 提交于 2019-12-06 07:15:41
问题 How can I convert all the remote branches in a local git repo into local tracking branches, without one by one checking each one out. One reason why you might want to do this (the reason I want to do this) is so that you can take a clone of the local repo and have in that new clone all the branches from the original remote origin. Because "clone" only clones local branches. Edit: a couple of scripted answers have been provided (for which - thanks!) ... I was really hoping for an in-git way,

Git pull gives conflicts with octopus strategy

让人想犯罪 __ 提交于 2019-12-05 16:18:11
Lately when I run git pull in my master branch it occasionally gives the following merge error: Trying simple merge with 7ff9b5... Trying simple merge with 6872cd... Simple merge did not work, trying automatic merge. Auto-merging file.txt ERROR: content conflict in file.txt fatal: merge program failed Automated merge did not work. Should not be doing an Octopus. Merge with strategy octopus failed. However after this merge attempt there are files that aren't even in the master branch. I can fix this issue using git reset and pulling again but I was wondering where this head or commits where

How can I convert all the remote branches in a local git repo into local tracking branches

此生再无相见时 提交于 2019-12-04 13:17:22
How can I convert all the remote branches in a local git repo into local tracking branches, without one by one checking each one out. One reason why you might want to do this (the reason I want to do this) is so that you can take a clone of the local repo and have in that new clone all the branches from the original remote origin. Because "clone" only clones local branches. Edit: a couple of scripted answers have been provided (for which - thanks!) ... I was really hoping for an in-git way, so that it is completely portable (I have users who are "windows only", and so far have survived without

GIT Rebase a Branch that is collaborated on?

前提是你 提交于 2019-12-03 17:06:50
问题 After reading this article, it makes sense to rebase to gather changes from the main branch on to my feature branch: Git workflow and rebase vs merge questions clone the remote repo git checkout -b my_new_feature ..work and commit some stuff git rebase master ..work and commit some stuff git rebase master ..finish the feature git checkout master git merge my_new_feature This works great if the feature branch is local to my machine and I can rewrite history as I please. But what if I

How to forcefully delete a remote branch in GitHub?

走远了吗. 提交于 2019-12-03 16:06:27
问题 I have 2 remote branches : - pending-issues-in-project - new-issues-in-project I tried to delete pending-issues-in-project like this : git push origin :pending-issues-in-project , but i got the error : error: unable to push to unqualified destination: pending-issues-in-project The destination refspec neither matches an existing ref on the remote nor begins with refs/, and we are unable to guess a prefix based on the source ref. error: failed to push some refs to 'git@github.com:forkedRepo

Refresh remote Git branches in Android studio

六眼飞鱼酱① 提交于 2019-12-03 14:53:28
问题 There is a new branch in the remote repository, but it does not appear in the git branches in android studio. How can I refresh that list to show the new branch? I have tried git branch -r but new branch is not showing in the list. 回答1: In your Android Studio menu bar, click on VCS > Git > Fetch Check the image: 回答2: You can try using VCS (from menu) then click on Git and then on Fetch . Alternatively, you can use git fetch --all 回答3: Try using git fetch or use git fetch --all 来源: https:/

Can't push local changes to an existing remote branch

試著忘記壹切 提交于 2019-12-03 10:48:17
问题 There is a remote branch called "my-remote" that I had previously pushed to with no problem. As of today, I can't push and I get different errors. First error I got was: hint: Updates were rejected because a pushed branch tip is behind its remote hint: counterpart. If you did not intend to push that branch, you may want to hint: specify branches to push or set the 'push.default' configuration hint: variable to 'current' or 'upstream' to push only the current branch. I did some research and

GIT Rebase a Branch that is collaborated on?

蹲街弑〆低调 提交于 2019-12-03 06:09:48
After reading this article, it makes sense to rebase to gather changes from the main branch on to my feature branch: Git workflow and rebase vs merge questions clone the remote repo git checkout -b my_new_feature ..work and commit some stuff git rebase master ..work and commit some stuff git rebase master ..finish the feature git checkout master git merge my_new_feature This works great if the feature branch is local to my machine and I can rewrite history as I please. But what if I collaborate with someone else on the feature branch. How do we get the latest changes from the main branch into