We use the git plugin to build all the branches of our repo (Branch specifier is **). The problem is if branch A breaks, we get notified by email. However, if someone pushed to branch B and it builds correctly, then we get a second email telling use “Build back to normal”. But the branch […]
I had my first look at branching and ended up creating some stupid branches that I have messed up. I wish to remove them. I can see them here in the file structure like below. So I can see all my heads there and what I would like to know is whether I can just […]
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 know I can just edit the .git/config file but it seems there should be an easier way.
I read that, normally, deleted branches can be resurrected. I’m looking for a way to completely obliterate a branch. One of the developers stuck 2Gb worth of assets inside that branch, which really is content and shouldn’t be inside the repo. Note: I’ve not merged it into master yet!
I have started to use git flow and have some questions. In examples like here and here I see a release branch started and then several commits done before the release branch gets finished. Why is that? Shouldn’t everything be ready and then being released? In the first example there is even a new feature […]
I have two branches on github: master and development. I want to push a newly created file to the development branch. String user = “user”; String password = “password”; String localPath = “local”; String remotePath = “https://github.com/some/git.git”; Git.cloneRepository().setBranch(“refs/heads/development”).setURI(remotePath).setDirectory(new File(localPath)).call(); Git localGit = Git.open(new File(localPath)); localGit.checkout().setName(“origin/development”).setUpstreamMode(SetupUpstreamMode.TRACK).call(); new File(“local/test”).createNewFile(); localGit.add().addFilepattern(“.”).call(); localGit.commit().setMessage(“message”).call(); localGit.push().setCredentialsProvider(new UsernamePasswordCredentialsProvider(user, password)).call(); What I get […]
I got a problem. I have done a couple of commits on master. But I made a mistake. I need to do these commits on branch_a. How can I cancel the commits on master and move them to branch_a.
Using SourceTree when I try to switch back to master from a feature branch I created I get an error: Updating the following directories would lose untracked files in it I want to switch back to master to make another feature branch but am unable to do so.
Rather than ask about specific git verbs (which the git documentation is based around), I’d like to ask what is the best approach for this particular task. I have a git branch with an ugly commit log, due to having been forced to commit to test the app. Lots of commits like: Fix typo Do […]
I’m not sure if this is a normal branching scenario but … suppose that I create a branch, say branch C, from master and then merge back other previously existing branches, say branches A and B, back into master, and I need some of the code from A and B in branch C then can […]