Tag: branch

Clone a git repository into a exiting non-empty directory

What is the best practice to clone a Git repository into an exiting directory which already includes some other files and folders? I have created 2 branches dev and master and locally working on dev branch. So I want to clone master branch in www folder which is the root of a website. Then at […]

How can I make a copy of some branch with regenerated hash ids of changesets in Git?

I can make a copy of any branch via several ways, but let’s take: git branch copyBranch It will make a new branch with the same state as the current one has. If to use git log you can see, that hash ids of commits are the same. I can regenerate in the copy branch […]

How can I delete all Git branches which have been merged?

I have many Git branches. How do I delete branches which have already been merged? Is there an easy way to delete them all instead of deleting them one by one?

Git retrieving lost branches

So I decided I wanted to change a branch name, and instead of creating a new branch I thought I will use this method, to rewrite the whole branch, but what it actually did was delete all my remote branches. Any idea how I might get them back. (Please note that I had more branches, […]

Git – using branches for environment configurations

I have a situation at work where I need to provide some version control to various product configuration files, mostly xml. I also need to have some form of access control for certain environment configurations(staging, production). We can have up to 13 different environments for many of our applications from development to production. What I […]

Diff only local changes in a merged branch in Git

Using Git, I branched from “trunk” the branch “A”, then committed several changes. Then, I merged from “trunk” because it was merged with branch “B” and I had to sync with those changes. Then I made additional changes on branch “A”. This is a diagram of the tree: branch A: T1–A1–A2–M–A3–* / / trunk: T1———-T2 […]

Git branches – statuses mixed-up?

I have a local master for my repository cloned and I update the same on daily basis with pull request I have created 2 branches with following commands and I work on both. These are also frequently rebased to master git checkout -b bug1 git checkout -b feature1 I switched to branch b1, pushed some […]

How can I check if a file has forward progress on another branch?

Our team is using git for version control. When each team member is assigned a programming task, they branch off our dev branch, and onto their own issue-# branch. With many unmerged issue branches in progress, how can I evaluate whether a particular file has forward progress, and on what branches? Example, I would like […]

Merging second time, wanting to see conflicts again – for tortoisegit compare/diff tool

Lets imagine a situation: Basic: Iam using Windows and tortoisegit configured to use beyondcompare as mergetool/difftool. I love the comfort. Two branches (master and my branch), already merged and conflicts resolved in the past. Conflicts resolved right in such a way, that the branches still do differ and thats OK! I would like to initiate […]

Git apply changes from a commit of a branch to an existing commit of other branch

I’m sorry if this has been discussed before, but since I haven’t found any solution for this specific case so I thought I would ask here. I had a branch (call it branch A) with 1 commit and created a new pull request from that branch. While waiting for review I created another branch (called […]

Git Baby is a git and github fan, let's start git clone.