This question already has an answer here: Move the most recent commit(s) to a new branch with Git 8 answers In git, how do I remove a commit from one branch and apply it to a different branch? 2 answers
I’ve got an annotated tag referring to a commit (does it matter if it is annotated?) and no branch referring there. Will the commit be garbage collected after some time?
So I am not much of a source control expert, I’ve used Subversion for projects in the past. I have to use Git for a particular project (client supplied Git repo). My workflow is as such that I will be working on the files from two different computers, and often I need to check in […]
I have imported from SVN into Git, now I have one big branch, like this: work on feature C work on feature B work on feature C work on feature C work on feature B work on feature A I want separate feature branches, for A, B, C. I’m cherry picking commits to new branches […]
My scenario is that I have one branch in which I’ve made big improvements to the build process (branch A) and in another I’m working on a unrelated feature (branch B). So now when I’m hacking away at branch B, I want to pull in the stuff I wrote in branch A because I want […]
I tried to understand How to undo a commit and commit the changes into the other branch in Git? but I don’t think it has to be that hard. (Answer is using branch -f and stash and I don’t think I need those.) I was working in my dev branch. Had two different commits in […]
I work on a large Scala project where we use Git for version control. My workflow is to work on new features in my own branch and switch when needed. Various releases of the code are in their own branches. All very standard. If I have to fix a bug in a certain version of […]
I have a script called ‘git–export‘ which helps me to export a remote repository. It is run like that: git-export http://host.com/git-repo <-t tag or -b branch or -c commit> /local/dir Before it was used to export local repository and I used these commands: to get commit from branch: git branch -v –no-abbrev|awk ‘($1==”‘$BRANCH'”) || ($1 […]
I have two branches: master and opengl. I recently finished implementation (or at least I thought so) of opengl branch and decided to merge it into master: git checkout master git merge opengl git push After I did this, several developers who are working on the master branch pulled my changes and it turned out […]
Let’s say that there are two people working on a git branch, they check out at the same time but one of them commits first and then the other commits after. Will the newest commit still be merged with the former commit or can multiple people work on the same branch simultaneously?