Using Git how to merge a subtree from remote branch
Subtrees in Git work nicely although some git commands remain to be supported for subtrees.
Here's the question:
How to make the subtree pull from a different remote branch like "stable" or "integrate"?
FYI, we have a
subtree "push" working as a script. In fact, it can even push the subtree to the specific branch of our choice on the remote repository.
Does anybody know how to do the reverse on a pull or even have a clue?
The simple pull works like this:
git pull -s subtree remotebranch
One idea that can be tried: Maybe a 2-step process will do the trick.
- The remote branch gets pulled from remote repository branch like "
stable" and then
- do the
git subtree pull to
My remote Git repository has 3 branches: master develop news When a dev change he will branch off develop such as issue123. When he finished changing, he will push to remote issue123. I will merge
I have a master branch and branched out from it to a build branch. I cloned this repository to a different machine. I created a branch my_build to track the remote build branch. Now i have few commit
I have a project where I've merged in a library using Git subtree. I've pushed and pulled a few minor changes between the library and the project. Later on, a new repository has been created which is
I have 2 git branches branch1 and branch2 and I want to merge file.py in branch2 into file.py in branch1 and only that file. In essence I just want to work on the file.py in branch1 but want to take a
I need to do a subtree merge for a specific branch, if it exists on a given remote repository. The problem is that the remote repository is not checked out locally, so I can't use git branch -r. All I
Imagine, I have several branches: master, a, b, c ... Now I'm in master branch and git pull. This fetches all changes from remote server into origin/master, origin/a, origin/b ... branches and merge
I'm having difficulty merging from my master branch to a separate branch I've been developing on in quite sometime. Doing a straight forward merge I get the following: shell$ git merge master fatal:
Yeoman's deployment page, describes the process of committing the build folder (aka dist) to the repo, then pushing that folder as a git subtree with the following command. git subtree push --prefi
what is the best approach to resolving merge conflicts in notes branch of a git repository? I ran into a scenario where in when I try to fetch the content of the notes branch from the remote repositor
I have been pushing to a remote bitbucket repo and recently a colleague has pushed a new branch he created to the same repo. I'm trying to fetch the changes he uploaded. $ git branch -a * master lo
how can git remote repository public or private automatically stores email address of when someone forks or clones a branch from any branch? or this feature isn't there ? for a github user I would nee
I am using git version 188.8.131.52 and I have the following situation: Clone git repo from svn | * * (<= commits to master & corresponding commit to svn) * * | master (points to svn HEAD) | |___ m
I have two branches. One is master, and the other one i myBranch and they look something like this: master | | myBranch | / | / |/ | I want to merge them into one branch, keeping all the changes from
We have git remote add origin http://... to avoid repeating typing of actual source repo path. But how about git subtree --prefix=...? It is hard to track, remember and unstable typing prefix path for
I have a local branch of a project (configUpdate) that I've forked from somebody else's project and I've done a load of changes on it and would like to merge the changes they've made in to my local
I've checked the remote branch Design0.5: the last remote commit on that branch is identical to the top local commit, here marked (no branch). So locally, Design0.5 is 5 commits behind where I'd like
I'm having trouble understanding what I did wrong when pushing to a remote branch. Here is what I did: I created a remote tracking branch locally named CP_Server_Release using the SourceTree GUI tool.
I've been trying to move away from submodules in order to get a self-contained repository, and the subtree merge strategy seems to match this use-case. However the merged repos' histories appear in my
Any solid examples of using buildout to download a tarball from a specific branch in Git into my eggs directory? All the answers i've tried seem to keep grabbing the version from PyPi instead. I'm tr
Is it possible to pull from a remote repository but only selectively take files from that remote that I'm interested in? I don't want to simply pull down the entire branch. Thanks.
I'm trying to switch to a branch: git branch new-ui When I do this I get an error that a file would be over written by a merge. This file does not exist anymore. When I do a pull from the current bran
I'm working on one of the cakephp website, where i use git as a version controller. I have 2 types of different branches are there : 1) development 2) ui When i try to push my latest changes from dev
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
I've recently switched to Git from CVS/SVN and so far enjoying it. However, in my latest dev cycle, I forgot a critical step in creating a master branch before creating my dev branch. In my normal cyc
This is not a duplicate of git pull from clean directory has merge conflicts - In that question the user was trying to pull from a remote which had commits which were not in the local branch. In my ca
This question already has an answer here: How to delete a Git branch both locally and remotely? 16 answers Help me to delete git remote branch. I work with netbeans and I tried to delete remote
I'm using the following Git command in order to create a new remote branch: git push origin origin:refs/heads/new_branch_name I wish that the new branch will start from an old commit, How can I do th
One creates a new git branch: git checkout -b test and pushed it to origin: git push origin -u test and listing all the branches now I get: master * test remotes/origin/HEAD -> origin/master remo
I am quite new to version control so bare with me. Ok so the remote repo has master and staging branches. And I am only suppose to work in the staging. So the first thing I did was clone the repo down
I'm trying to add a repo (called cow) to my project using git subtree add. In particular, I'd like to add the branch stable (which is not the master branch). I tried: git subtree add -P cow https://gi
I am very new to git and wondered how I should go about a merge where in the local repo I have deleted several files on the master branch but these files exist within the remote master branch. After d
I'm getting crazy with Git :) I have 2 branches : master and dev I want to create a feature branch from the dev branch Currently On branch dev, I do : $ git checkout -b myfeature dev ... (some work
I have successfully split a previous commit deadbeef using git rebase -i deadbeef~1 as suggested in this question. I did this on my development branch. As far as i can tell everything is fine, deadbee
I am struggling trying to make sense of using the Git subtree strategy. My intent was to pull some disparate repos together into a little family of toy repos under an umbrella repo. I'm using the subt
Aim : To delete a remote branch named 'branchname' Steps I used to do was: [first approach] git branch -d branchname git push origin :branchname Today I tried to delete using the same above steps, b
How can I get list of branches emerging from any branch in git ? Also what is the difference between fetch and pull command in git ?
I have a bunch of remote (tracking) branches that I have created local branches from (so I can write, commit and push) eg. origin/myfeature. Now I would like to merge origin/myfeature into master. I c
I have a master branch and a working branch_1. I want to 'move' branch_1 exactly as it is to master. So I want something like this: git checkout master git merge branch_1 # I don't know what is correc
I have a quite specific workflow and the reason for that is that I use git subtree to include one project inside another: a local git repository styling which is updated by pull from a remote reposit
I was originally on my master branch. Then, I created a new branch: git branch my-other-branch Then, after I made some changes on my project, I pushed this branch to origin to make it a remote branch
Using Gerrit it is easy to accidentally merge unstable code from the develop branch into the stable branch: $ git checkout develop $ commit $ git push origin HEAD:refs/for/stable In Gerrit it isn't v
I'd like a command that emits the name of the tracked branch for the branch I'm on. Something like: $ git checkout --track -b topic origin/master Branch topic set up to track remote branch master from
I merged in changes from another branch but I am getting conflicts because a file has been deleted on remote but has changes on local branch. I would like to delete the file - I tried git rm path/to/f
This question may sound silly, and I am pretty much an amateur in git, but does the git merge or git pull command, creates a new branch when there are conflicts?
This question already has an answer here: Move the most recent commit(s) to a new branch with Git 7 answers In git, how do I remove a commit from one branch and apply it to a different branch?
I'm fairly new to git. Just a few minutes ago, I performed a merge on two branches; let's call them A and B. I was 'on' branch A; my next command was 'git merge B'. It said there was one conflict, but
I have a branch I've already pushed to github using --set-upstream. I want to rename it now, and have that change reflected on github. Here's what I want to do git branch -m oldbranch newbranch git pu
I have one problem, I have been reading about that but I am not sure which solution is correct and as of now I am unable to test which solution is the right one. So, I am working on a remote branch, c
I use Git Subtree like below: git subtree add --prefix=directory_destination_path --squash email@example.com:kicaj/projectname.git master But in path: directory_destination_path copy all repo from pr
I have gone through a huge refactoring effort and would like to push my local git branch (call it local_b) into a temporary remote branch which my CM can deploy in a dedicated environment for the QA t