I think I’m missing some basic idea about GIT branches. Let’s say I’ve cloned a repository on my machine, and started working (on local “master”). Now someone have told me about a bug in production. I want to stop everything I’m doing (modified filed and un-pushed commits), create a feature branch that is based on […]
I would like to know if it’s possible to work on two branches simultaneously if I want to write code that is supposed to be in those two branches. So that, if I commit my changes, it actually updates both branches. For example : The code in my branch A is this print “I like […]
When I create a new branch and then want to push it remotely, I can do: git push origin prod OR git push origin prod:refs/heads/prod What is the difference ?
I have a repo where my master has many commits… i want to create a new fresh branch from the first commit (the original code) so i do as follows: git checkout -b mybranch 4589D6a09505837ec03b where 4589D6a09505837ec03b is the first commit id… everything seems ok and now i’m at mybranch. But I look at the […]
I’ve done a fair bit of research/practices on rebasing and merging our remote branches but I am unable to find a solution that ultimately doesn’t result in duplicate commits or a non-fast forward push of the remote branch. Here’s what I’m trying to do. We have two branches, master (tracking origin/master) and hebe (tracking origin/hebe). […]
As much as I’ve tried to avoid it, I have to maintain three master-equivalient branches with minor changes in each one. I’ve been reading about git and using it for a couple of years, so I’m familiar with the following conventional wisdom: Don’t merge unless it is meaningful. Use rebase instead. If you just need […]
What does the the arrow (->) mean here: * development master production remotes/origin/HEAD -> origin/production remotes/origin/development remotes/origin/master remotes/origin/production I’m just trying to get a real handle on git, so I’m diggin’ deep and finding out that the further I go, the less I know about git, haha.
My remote repo’s master branch looks like this (each one is a commit): A – B – C – D – E – F – G I would like to get a code review that diffs C and G (C’s changes from B should not be displayed). How do I do this? Do I have […]
I want to merge a branch into another branch selectively & then merge another branch ignoring 1 branch in between. How do I do this with Git? I am using Git Extensions for visual studio.
I’m trying to clean up some branches in a fairly large project. We essentially have master, a bunch of release branches (of which only the most recent is maintained), and feature/bug fix branches off each release. The process is normally bugfix/feature-branch -> current-release-branch -> master Now I can see there’s quite a few old feature/bugfix […]