git-branching

How do I delete a Git branch both locally and in Github?

I created a bugfix branch to fix a bug on a project that I had forked on Github. I gave a pull request to the developer to incorporate my fix, but the developer decided to implement a different fix for the problem. At this point, I want to delete the bugfix branch both locally and on my project fork on Github. Successfully Deleted Local...

How do you merge changes on non-master branches from a forked github repository?

In both of the following StackOverflow questions, the accepted answer describes how to merge changes from a forked repository in the situation where you fork a repo, the original repo is modified, and then you want to merge the changes made to the master branch back into your forked repo. Merging between forks in GitHub Merge changes f...

Can I pull only certain files from another git repository?

For instance, suppose I have Repository 1 and Repository 2. Repository 1 has a file /a/b/c/d. Would it be possible for me to import this file into Repository 2 as /e/f/g/h? The reason being that I want to pull in changes from an experimental branch from a different git repository. I tried merging everything together, but there were a...

How can I track a single branch on subversion with git.

Hi all, I'd like to track a remote branch on SVN from within Git. I can see the basics of how to do this with the git-svn command, I was hoping to do something like the following: Git branch | SVN branch ----------------------- master | Trunk feature1 | <not mapped> feature2 | <not mapped> so that once I merge into git/master...

Imposing a Partial Ordering on Git Commit IDs

I'm converting the infrastructure at my workplace to use git instead of svn. The overall migration is going well, but we have a tool that I developed to do our SQL schema migrations. In order to deal with individual schema change dependencies, the migrations script used subversion keyword replacement to put the last-changed revision nu...

Git branch strategy for small dev team

We have a web app that we update and release almost daily. We use git as our VCS, and our current branching strategy is very simple and broken: we have a master branch and we check changes that we 'feel good about' into it. This works, but only until we check in a breaking change. Does anyone have a favorite git branch strategy for smal...

Git - switching between branches in the middle of work

For various reasons (code review mostly) I need to switch from current development branch to other branches quite often. Currently, I use either 'git stash' to shelve the uncommitted changes, checkout other branch, then switch back and do 'git stash apply' However, sometimes I'd have some newly added files there, which are not tracked....

Git branch unknown to local clone

I have a git repository with two branches. If I clone my repo I can only see the master branch. I have both branches up to date. The problem is I don't fully understand merging and branching. Darn it! My example can be seen here: http://github.com/rimian/rimian/network Can anyone tell me how to get this back to normal? ...

Is there a way to lock a branch in GIT

I have an idea of locking a repository from users pushing files into it by having a lock script in the GIT update hook since the push can only recognize the userid as arguments and not the branches. So i can lock the entire repo which is just locking a directory. Is there a way to lock a specific branch in GIT? Or is there a way an Upd...

Sync GIT and ClearCase

I am currently working on ClearCase and now migrating to GIT. But we need this migration in a way that all work will be done in GIT and the data will be synced backed to ClearCase stream. We will have the same branch names and stream names in both GIT and CC, so scripting shouldn't be a problem. The problem here is, Can someone suggest ...

Git branching / rebasing good practices

I have a following scenario: 3 branches: - Master - MyBranch branched off Master for the purpose of developing a new feature of the system - MyBranchLocal branched off MyBranch as my local copy of the branch MyBranch is being rebased against and pushed to by other developers (who are working on the same feature as I am). As the ow...

How to do simultaneous builds in two Git branches?

I've looked at git-new-workdir, but I don't want the history to be shared because the branches have a release-main relationship. That is, changes in the release branch I want to propagate to the main line, but changes in the main line I don't want in the release line. A common pattern for me is to fix a bug in the release line, integra...

Find the git branch or branches from commit id

Hi All, Actually am try to get a report on merge conflicts. I used 'git blame' to see who has changed what line, but i couldn't find the branch and repository name information. Is there a way to find the repository name, branch name and author name of a file from 'git blame' or from commit ids' so that whenever a merge conflict occurs ...

How to replace master branch in git, entirely, from another branch?

Hi, I have two branch in my git repo: master seotweaks (created originally from master) I created "seotweaks" with the intention of quickly merging it back into master, however that was 3 months ago and the code in this branch is 13 versions ahead of "master", it has effectively become our working master branch as all the code in "m...

It is possible to merge/rebase non direct relationship branches??

Hello, As a integration test I would like to join several branches before merging them with my master. All of them diverged from the master and make it's own way. It is a correct merging different branches with no direct-relationship (e.g. parent/child)?? Is there any good practise for rejoining branches?? Thanks in advance, Raul. ...

How to find if a branch is a locally tracked branch or user created local branch?

I have a remote tracking branch tracked locally in my local repository using 'git branch -b branch-name origin/branch-name'. My remote branch is test2/test2 (origin/branch-name) which is being tracked locally as test2. The origin is also named test2. I haven't checked-out my local tracking branch test2. When i do a 'git pull origin rem...

Does GIT have evil twin issues?

In ClearCase evil twin occurs when two files are found with the same name in two different versions of the directory, and If the element OIDs are different but the names are the same. In GIT the SHA1 id is always unique and file with same name always have different SHA1 id’s. We don’t have a concept of Evil twins, but there are likely ...

Creating a new branch on the remote repository in git.

As the title says I am trying to create a new branch in git on the remote repository. To do this I have previously been using the following command. git push origin origin:refs/heads/rounding_issue Which normally just works and I can then run git branch -r To confirm. This morning however this is not working and I have received t...

Why does git-rebase give me merge conflicts when all I'm doing is squashing commits?

We have a Git repository with over 400 commits, the first couple dozen of which were a lot of trial-and-error. We want to clean up these commits by squashing many down into a single commit. Naturally, git-rebase seems the way to go. My problem is that it ends up with merge conflicts, and these conflicts are not easy to resolve. I don't u...

git-svn branching: how to configure git config

Hi, a few months ago i configured a git with an svn repository. Until now i only used the svn repository to keep up-to-date with the supplied application on it. But now i also want to commit stuff back. To do this every feature i'm going to commit needs to be in a separate branch. I read about how you should create a new branch etc. But ...