Tag: git branch

How to keep multiple copies of a file in single Git branch?

I have a configuration file in two locations in my repo, used for two slightly different purposes in my application. The two copies of the file are always going to be slightly different. But, when I want to make changes to one, I often want most of those changes to be applied to the other […]

Git server side branch

I am currently learning to use Git, as it is required for a project I will be managing in the future. I was hoping to be able to have branches in the repository, so that when somebody clones it, they will have those branches ready for use in their local clone. Now it seems like […]

How does one create a multiple “syncronous” repository remote GIT branch in intelliJ

I have a large intellij project that has 12 git roots and have it set for “synchronous” repository/git root management. I can easily create a new local branch on all the repos, but I can’t figure out how to push out the new branch to a *new*remote*branch* on all the corresponding remote repositories. Push even […]

Prevent pushing into a wrong remote branch

I want to have two branches locally (e.g. a-local and b-local) and two branches remotely (e.g. a-remote, b-remote), and they match in pairs (e.g. a-local – a-remote, etc). How do I make sure I don’t accidentally push a local branch to a wrong remote branch (e.g. a-local -> b-remote)? I’m using git 1.8.2.3.

How to maintain django different settings both on server and Github

This question already has an answer here: Using Git to keep different versions of a file locally vs. in the master repository 2 answers

Messing up with branches, old master branch shows files from the new branch?

As you can understand I’m still learning Git and how branch works. Anyways: I was working on a local master branch. I created and switched to a new fcwdetection branch for adding some code, using my IDE, meaning not through the command line. The IDE has asked me to add new files I created (say […]

Creating a remote inside a directory of remotes

I am working on a project with multiple contributors who work on adding new features. When I git branch -a, it shows something like this: remotes/origin/usr/username1/featureA remotes/origin/usr/username2/featureB remotes/origin/usr/username2/featureC remotes/origin/usr/username2/featureD remotes/origin/usr/username3/featureE Local changes are pushed to these remotes before they are reviewed and merged with the master release branch. How can I create a remote that […]

Merge fast-fowards to another branch and no commit record is created

I have a master branch and debug branch. They are one commit apart. debug branch is branched from master and has one commit. When I merge them, git fast-fowards master branch to debug branch, not creating another commit as I am familiar. It is missing some information, namely comments, from the master branch (which becomes […]

Git: see many branches in a single view

Is there any way to see changes from many branches in Git in a single view. For example if my project consists of scripts part and C code part, can I have them on two separate branches but still see all changes in a single view?

Git stopped tracking changes

I am in the working directory and I have created a new branch git checkout -b someBranch But after work in some files the status don’t show any change git status # On branch someBranch nothing to commit (working directory clean) Any idea of what is causing this issue? Any tip to start tracking again?

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