How to handle dependencies when using git topic branch workflow?
In our project we try to stay close to the "official" git workflow as it is suggested here: http://www.kernel.org/pub/software/scm/git/docs/gitworkflows.html
We use a
next branch, start our topic branches off from
master, regularly do test integration into
next, and if a branch is complete, we merge it into
Now sometimes it happens, that there's some development on
topic-X. A developer creates
somefile.c and adds code there that he needs for his topic. After a while another developer works on
topic-Y and finds out, that he also needs to create
somefile.c and even would need some parts of that file from
topic-X - but not the complete file, as it also contains code, which is only related to
topic-X. He may also have to add other code to that file.
topic-X would be complete and merged into
master, it would be easy: We could rebase
master to make that code available. But what, if both topics are still incomplete?
topic-Y are really unrelated, except for this minor shared code in
somefile.c, how can we avoid to merge them into each other and still provide both developers with the shared parts from
If we create a fresh copy of
topic-Y with only the relevant parts, we found that we get merge conflicts later, when we do test integration in
next. Is there any alternative?
How do I get the hash of the latest commit... when in detached HEAD state without specifying the branch explicitly git rev-parse HEAD and git log -n 1 --format=%H both follow the detached HEAD (ob
Such as, I have deleted the patch-1 branch in github.com, and run git fetch origin to update local repo to track the remote, but the command git branch -a still show I local repo tracking remotes/orig
Our git development workflow is that topic branches are continuously rebased on the latest master until they are merged. However, a new developer has created topic branches in which he has done severa
Here's my problem. I have a branch off master, and i made some changes. A little later my partner reverted a change they had made because it was breaking something. When i ran git fetch; git rebase ma
I've just started using git and while it is relatively easy to find out how to do something with git I'm having trouble figuring out when to do something with git. For instance, when does one usually
We use the following git workflow at my company when coding up a new story: Create a topic branch off of master (production/stable) Create as many commits as desired to implement feature. do a git me
I have read the Packaging Software using git article until my eyes are sore, as I can see from this image, it recommends merging from upstream->topic branch->local integration branch. I am speci
I have master branch (It is working copy), then some point in time I created another branch named topic and was working under it. But yesterday I did rebase on master branch. Now when I build my proj
Possible duplicate: Getting existing git branches to track remote branches I know how to make a new branch that tracks remote branches. But how do I make an existing branch track a remote branch. I k
I'm working on some feature with my co-worker. We created topic-branch. And everything is ok when we only merge everything - our branch on server with local copies and master to keep our branch up to
I cannot figure out how to update a branch to be identical to another branch. Here's an example: git init test; cd test echo apple >a; echo banana >b; git add a b; git commit -m 'A1/a:apple;b:ba
Let's say I have a Git repo with branch A and branch B. Branch B is currently checked out (i.e. .git/HEAD contains refs/heads/B). Now, without checking out branch A, how to view the history (log) of p
What's the git equivalent of the following svn workflow: export foo import bar Is it the following? checkout master tag foo branch bar
I have two branches, master and mybranch in a git repository. In a local folder cloned from the git repository before adding the second branch, I can only see the first branch, as expected: xxx$ git b
I'm trying to get my head around a good git workflow using capistrano. I've found a few good articles, but I'm either not grasping completely what they're suggesting (likely) or they're somewhat lacki
I would like to stop tracking certain branches. I set up tracking using git branch --set-upstream foo origin/foo. How do I undo this?
I've named by error a branch -update. When I try to rename it with git branch -m -update update I get the error error: unknown switch 'u'. Is there a way to rename the branch? Thanks!
I'm using git-svn to work against my company's central svn repository. We've recently created a new feature branch in the central repo. How do I tell git about it? When I run git branch -r I can only
I want to push to a branch which is not master. That is what I did: git init git add . git commit -m first git push origin second (second is the name of a branch) but it say fatal: origin does not
I set just a simple description for my local branch and now I'd like to see it. How one can see description for a branch set by issuing git branch --edit-description?
My current process is: git checkout dev make changes and commits (& push to development branch on origin occasionally) git checkout master git merge dev git push origin master git checkout dev
I write multi module android projects. One of this module - it is another project in git repository on gitlab. How i can pull it in gradle? I tried gradle-plugin-git-dependencies and maven-git-commit-
Simplyfiing I have a created a git branch structure like this: Generated from: git init echo Hello World > file1.txt git add file1.txt git commit -m Hello world git checkout -b A echo This is
I've made a parallel topic model using mallet. And I want to get top-words for each document. To do that, I'm trying to get a word-topic probability matrix. How would I achieve this?
I start some work on a topic branch •-•-• < topic / •-• < master I push the topic branch $ git push origin topic Someone else pushes changes to master •-•-• < origin/topic / •-•-•—• <
We are checking out git and would like to understand which workflow might suit our small team (4 developers). Some details about what we do: We are working on a .NET product that is currently compose
When working with many projects and branches at the same time, I occasionally do stupid mistake like pulling into the wrong branch. For example being on branch master I did git pull origin dangerous_c
Say you have a branch on your origin that has a ridiculously long name... $> git branch -a * master origin/master origin/branch-with-a-ridiculously-long-name And when you work on that branch local
I wrote a bash function which do some handy tasks on entering a git repository on console. It also gives me an overview of all branches using git branch -avv For my inconvenience, git is flooding me
I have an issue when I try to rebase an upstream branch into a topic branch. The workflow is like this: git checkout upstream git pull origin upstream git checkout topic git rebase upstream The resul
I would like to understand which is the better way to realize the workflow I'm going to present with Mercurial. I know how I would do it in Git, which I'm much more confident with, but couldn't find a
we currently generate a dependency file for every .o. But when do an incremental build, Make reads from the dependency file for dependencies for each .o. Is Make checking the time stamp of these depen
I have a project which is built for multiple OSes(Linux and Windows for now, maybe OS X) and processors. To this project I have a handful of library dependencies, which are manly external but I have a
With our current setup you always have to enter the branch name (ie: git pull origin feature-branch when doing a pull. I've already made the mistake of pulling from one branch into another, accidenta
We're using TFS2010 for our ASP.Net project's VCS. Recently there's a need to make some minor changes but affecting a lot of files. Since branching is only reserved for major release, we've decided to
In git, supposing I have a branch master and a tag 0.0.1, if I do the following: git checkout 0.0.1 git branch -b random-fix # some changes... git checkout master git merge random-fix The branch from
So I have /trunk, to which all things golden are eventually committed. And I have a topic branch, /topicA. Normally, you would merge /topicA into trunk and it would be one commit. Hooray! To undo this
I am in the process of porting my JS+requirejs code to typescript+requirejs. One scenario I haven't found how to handle is circular dependencies. Require.js returns undefined on modules that are also
I would like to know if the following is possible in git: Suppose I have the following history: A---B---C---D---E master \ W---X---Y topic I would like to merge all the changes made in the topic bran
When working with local topic branches, I always rebase before merging with master so that I get a clean fast-forward merge. I'm now sharing collaborating with somebody, and we chose to do this by
We are considering introducing Git into our workflow. At the moment, we have a general PHP template that we copy paste for each new project. The copied template then gets extended with modules specifi
We have a workflow requirement that essentially mean that we need to have the artifact version of a module externally defined from the current branch in git. I.e. if we are on the master branch in git
When you create a new repository and run git branch, it exits silently. For example: $ mkdir /tmp/foo; cd /tmp/foo; git init Initialized empty Git repository in /tmp/foo/.git/ $ git branch Why doesn'
When you run git branch -r why the blazes does it list origin/HEAD? For example, there's a remote repo on GitHub, say, with two branches: master and awesome-feature. If I do git clone to grab it and t
I am trying to create a bash variable which I can use to refer to my current branch in Git: something like $branch. When adding: branch=$(git symbolic-ref --short -q HEAD) into my bash_profile, I keep
I am trying to use the new googleapi for Freebase Topic API as the old one is going to get deprecated. I would like to use my API key in the query as I am getting a 403 error of limit. I am trying lik
I am using git version 22.214.171.124 and I have the following situation: Clone git repo from svn | * * (<= commits to master & corresponding commit to svn) * * | master (points to svn HEAD) | |___ m
This question already has an answer here: Make an existing Git branch track a remote branch? 10 answers I created a new local branch and pushed it with git push origin my-branch How can I auto
I would like to know how to create git branches as below: --> I have a master branch --> I want to create branch1, make some changes and will push later. --> on same master branch i want to c
I'm from a Subversion background and when you had a branch, you knew what you were working on with These working files point to this branch. But with Git I'm not sure when I am editing a file in Net