Tag: git branch

Git make local branch track master from second remote. Github/Overleaf

I have my thesis in github and on Overleaf. However on my master branch on github (and locally) I have several files which are not accepted by Overleaf and I can’t push them. Therefore I created another branch called “overhoja” where I removed those files and changed the .gitignore. However, Overleaf does not allow to […]

Relationship between git branches and a release

I’ve used git for sometime now, but it isn’t clear how git commits relate to releases which relate to the master branch. My understanding now is master branch is like any other branch in git. It is just created with git init upon initially making a git repository. Thus, can someone explain the relationship between […]

Declined pushing develop to remote master which is protected after build in Jenkins

Remote master branch is protected which means least one approved review is required before merging. So I want to merge develop branch to master after build. my jenkins‘s configurations of project are like this as below. It will make local master branch is merged by develop branch in the workspace of jenkins server. Build the […]

Git submodules vs subtrees vs branches – how to choose the right one in a directory structure

I have a private Git repo with the following structure: A is the root directory and the remaining are the subdirectories. There is only one branch – master as of now. All of the code is meant to be run on Windows platform. Now, I had migrated D to Linux and to categorize/group logically, I […]

TortoiseGit Graph does not show expected branching

Problem: The graph from TortoiseGit show log does not show the branching as expected. The development branch change color half way! From the steps below, it looks like it changes color at step 4 (from red to green)! How can I make sure it use just one color? (Please note that I would like to […]

git: copy a worktree of a remote branch that is not present at local

At work, I have a project that it has two different version with some common basic features. I make use of git worktree to put these versions in separate folders that I have two long-running branches beside master for each version and the master is for common features. So there are 3 folders with one […]

How to split commits automatically into different branches?

For my school projects, I was used to have one big repo with several subdirectories for the specific projects. Because I had no time, I always commited anything into the master branch. The problem is, that this turns out to be unpracticable, as it becomes more and more difficult to revert older commits or figuring […]

Checking out specific branch from github

I used to pull down jQuery-ui by doing git clone git://github.com/jquery/jquery-ui/ git checkout 1.8.6 This stopped working today. After I do a git clone on an empty repository, the checkout fails with: error: You have local changes to ‘demos/spinner/currency.html’; cannot switch branches. Any recommendations on how to fix this? I don’t want to pull zips […]

Git branching on a MVC project – 2 or more views with shared core

I’m starting to learn git branching, and I’m developing with other people a web based MVC project (using Zend). We just worked on the master branch since today; now we need to develop tow different views (html aspect, css & co.), so we created a branch, let’s call it newview. Obviously we keep developing models […]

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

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.

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