using git reset on master when I've been merging back and forth with a local branch
I've been making changes in a local branch branch_a. I thought these changes would need to be merged into the master, so I merged into my local master. I then carried on working in branch_a, occasionally pulling into my local master the most recent updates from other ppl and then merging those into branch_a.
Now it turns out they don't want those changes from branch_a in master. How do I revert my master back to it's original state a couple of months ago (my result of the merge from branch_a are committed but not pushed). I can't reset can I because my local branch branch_a is dependent due to the merging from master (although I only want the changes from the remote master branch, I've not really much anything in my local master - nothing I want to keep anyway - it's just stuff after I merged the other branch in to get it working nice). Can I rebase branch_a to remove the dependency on my local master branch, then reset? Or should I use revert so the history is not deleted? (Basically I don't want master to get messy with my local merging and tiny fixes I did after the merge).
I worked on a major refactoring of a big project. This refactoring was done on a dedicated branch, and is now finished. During that time development on master continued. Now I'd like to merge all the
After messing up with my git branches a lot, I ended up with a stable develop branch and unstable master. I merged my stable commit of develop branch into master. But still my master is unstable. How
I have develop & master branches, my develop branch is messy now and i would like to reset it and make it as a copy of my master. i'm not sure if merging the master into develop will make both of
I have a master branch which merges to feature branches. It's been several times now that I'm starting to do something in feature branch and then realised that I want part of those changes in master b
I am using the Git GUI called 'Souretree' by Atlassian and in particular the 'Gitflow' module to manage various branches. I just created a 'release' branch that I don't want to merge back into either
I am completely new to Git. I committed some wrong code and then to rectify it, I reset my current branch to the previous one. But somehow this didnt do what i wanted! Now my master has an additional
feature-branch----C---D / develop---A---B / master I have a branch feature-branch that has been merged off a branch develop. This develop branch is an ongoing branch that is merged into master weekly
When I want to merge to a local branch I do this: git checkout master git pull origin master git checkout my_branch git merge master Is there a way to merge from the master on the repository into my
I have a remote branch where I pushed up changes from my local, then realize there was changes to master so i checkin to master run git pull then go back to my local branch and run git rebase master,
I am learning git. I created a new NEW branch from my master branch and created a new file in NEW. Now when I switch back to master, the newly created file in NEW is visible in master branch. Is it no
I am setting my local branch to track remote branch like this: $ git branch --set-upstream foo upstream/foo But when I do git status, I get: $ git status # On branch foo # Your branch and 'upstream/f
I tried: $ git rebase -i --onto master mybranch $ git rebase -i master mybranch $ git rebase -i mybranch master $ git rebase -i --onto master master mybranch $ git rebase -i `git merge-base mybranch m
I use git to maintain multiple working copies of my code. The idea is that I can check out any branch, build and run it to see how the branch's feature x fits in with the current state of the code. G
I am setting up a automated build on top of a git repository. I want to automatically build versions from the master branch -- I'm using git archive to a build sandbox -- and, depending whether the
I need to lock master branch of a git repo. I tried pre-commit hooks but they are only client side hooks, but I want to lock master branch from most of the users. Can anyone tell me the steps for pre-
I just deleted the wrong branch with some experimental changes I need with git branch -D branchName. How do I recover the branch?
I've been working on a local copy of a remote git repo. I created a branch on my local copy, let's call it 'my_branch'. I've committed a few times on my_branch. I recently pushed 'my_branch' to remote
Background: Our team needs to connect to an svn server and work on a particular branch (not the svn trunk). On top, we need to also get the trunk and merge between them. I have set up a local git repo
$ git branch -a * master remotes/origin/HEAD -> origin/master remotes/origin/lab_master remotes/origin/master $ git checkout lab_master error: Your local changes to the following files would be ove
Pulling any branch from any repository from a computer inside the git server's LAN works. However, on any remote computer (not on the same LAN as the git server), pulling master from any repository wo
I have configured one repository in GitHub MyRepository` In this repository, i have one branch master and in this branch i have one project Test In eclipse i created one local repository, the st
I have 2 branches local and remote like below. # dev master Right now I have merged changes local using git checkout master & git merge dev. It works great. Using git status I got below: Your bra
I have a remote repo on github, and on my local machine I have a few different branches (so I can switch between the branches using git checkout master, git checkout branch2, etc.). When I run the
Currently when I'm using GIT I create a branch for each job and make various commits before I'm finished. I then merge back with my master branch and push upstream. I'm likely to have several branches
I'm not sure how I got into this state, but my master branch on my local git-svn repo seems to be pointing to the remote UAT branch. git status # On branch master nothing to commit (working directory
I am working on a PHP web application and some times I would like to just fix a bug or add new feature and test it, before merging with the master branch. My understanding is that Git doesn't create a
A branch has become the most current line of development so the trunk was outdated. When merging the branch back into trunk through Merge two different trees, none of the history of the changes in t
I have a vanilla git installation with default configuration, version 1.7.1. So I do the following actions: git branch local_only git checkout local_only git push local_only does not exist on remote.
I have a repo set up on GitHub, with a Dev branch, which I clone to my local machine using: git clone https://github.... I then switch to my Dev branch using: git checkout -b Dev I then pull just to
I have the following git workflow situation that raised the question -- can you rebase back/forth between branches? The local branches (same as on origin): master branch_a (cut from master) branch_b
What's the best way to merge the branch back into the trunk? I assume do an SVN merge to your working copy, merge the changes and check back in? So I'd merge FROM the mainline TO my branch?
We have a shared directory (call it /shared) that we keep automatically up to date with our master git branch, by running these commands whenever there is a push to master: git reset --hard HEAD git
I've created a repository for a site i've been working on lately. Now i'm going to be duplicating the site, thus my thinking is i'll create a new branch in Git, that way I can deal with changes to tha
I noticed the following branch merged to master branch. I have a DEV and Master stream. This branch was merged to DEV but some how also found in master when I review master by issuing git log origin/m
We're just starting with SVN (were using CVS before :shame:) and I have a problem with merging my branch back to trunk. I've created Branch1 from trunk, made some changes and merged it back (without a
I have forgot to create local branch and was working with remote. After making some changes, i by mistake using Eclipse Git plugin commit this branch in nowhere(obliviously there wasn't local branch).
In my master branch, I got 2 files: file1.txt file2.txt I created new branch named b1 from there. In b1, I modified file2.txt, and accidentally deleted file1.txt (from disk, when I open windows expl
I'm using TFS and trying to merge a branch back to the trunk from which it was made. Trouble is, the Source Control Merge Wizard has no entries in its Target Branch dropdown list. I suspect this is be
I have 2 local branches: master and another_branch. This branches have few commits on server. My tracked branch: another_branch. I use git reset --hard and current branch loses all current local com
I'm working on a git repository that has a branch off of master, we'll call it the ab branch. My team is working on the ab branch and has a pull-request workflow using github. One of my teammates made
So I'm using git and interacting with an svn repo. I have a svn TRUNK that looks like this: A-B-C-D And a svn bug_fixes branch that branches off at commit B or C: -c-d-e-f-g-h-i Now I need to get t
When I clone a remote repository with git clone 'repo_url' git pull git status I get this message - On branch master Your branch and 'origin/master' have diverged, and have 41 and 20 different comm
This question already has an answer here: How to discard local commits in Git? 5 answers I am getting the following when running git status Your branch is ahead of 'origin/master' by 3 commits.
This is probably one of the silliest questions i have asked. I'm trying to use Git for a project set up by someone else. I have pulled the master branch from the remote repository and I branched it
How does one revert a remote git repo after a reset done locally? We had accidentally pushed changes to master branch. I've reverted the code in the local branch to the last good commit. Now, I am try
I am playing with the git show-branch command and have a question regarding the output. When I execute from branch branch git show-branch I get as output: ! [branch] Add branch_file4 * [master] A
I have a remote repository (origin) and my local repository. How to make a diff between my local master and the origin master please? In the command line I simply write : git diff master origin/master
I am using branching to create and deploy custom instances of out platform. These instances usually start as a branch from the 'master' branch, get customized somewhat, get deployed into testing and p
Suppose I was on master branch and created a new branch: git checkout -b feature_branch I started to work on feature_branch, and at some point I would like to merge my changes to master using rebase.
A few days ago I created a repository on Github, then followed the steps to add my existing solution to it. I have no idea what I did wrong, but after a few random 'git add' commands and whatnot, I no