Tag: branch

Switch branches without losing uncommitted work

Is there any way to switch from one feature branch to another, when the changes in the current feature branch are not yet ready to be committed? I often find myself in a situation where I’m out of ideas when implementing a new feature or fixing a bug and I need to switch gears and […]

Git in Xcode 6.3: Master branch showing new files from other branches in red and won't compile

I am using Xcode’s integrated Source Control with Git and I have the following problem: I have a perfectly working master branch and I want to work on two new features. So I create two new branches, where I add one new file at each branch. Now when I switch back to the master branch […]

Deny WRITE access to specific branch in gitolite

There is my part of my gitolite conf: repo myproject RW+ = teamlead1 teamlead2 – = dev1 dev2 dev3 R production = dev1 dev2 dev3 RW+ = dev1 dev2 dev3 R = deploy So, I want: teamleads to have full control of myproject repo devs to have only READ perms for “production” branch, and full […]

How can I retrieve the local changed files which I wrongly reset in git

Below is the situation which explains what’s the matter about git. I was using the ‘develop’ branch and already made several changes to the local files such as .sql, .java, .js… I made a local branch called ‘develop_some_future’ since my boss wants to confirm my changes before merging main ‘develop’ repository. Apparently my local file […]

Best practice for three environment setup – to avoid pushing things live when not ready yet

I am fairly new with git, and am not quite sure what is the best way to go about doing what I need to do. So the setup I have is this: I have my localhost where I do the work, then I have a test environment where the client can test out new functionality, […]

Creating branch off of remote master

I have problem understanding the logic behind the following command in Git: git checkout -b hotfix_example_1 origin/master If I type it then a local branch called hotfix is created that branches off of the master branch of my remote repository named origin. When I later push it to my remote repository the graph looks like […]

Cannot push new branch to git server

I am new with git and I am trying to set up a git repo in a VPS. I created a git repo in the server and then cloned it to my local PC. But when I try to create a new branch in my PC and push it to the server, even though it […]

Flatten old GIT branches to master

I have a GIT project with master branch and a couple of other branches. All of these additional branches contain only one commit: — a — b — c / / / — A — B — C — D — E — F — G I’d like to flatten this GIT repository to contain […]

Git: master / develop / feature branch merge commits

Here’s the flow I’m following: master branch is always in sync with production develop branch is always the next version to be released feature/feature-name branch is the feature currently being developed. After the feature is done, a pull request is raised from feature/feature-name into develop branch, then from develop branch into master branch. We do […]

Push to branch on GitHub given branch url

As a git beginner, I am having the worst time with this. If this question was asked before, then I apologize–but I cannot find any Stack Overflow page that gives me the answer I need. That being said, here is my question: What are all the steps required to locally push to a branch on […]

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