Why doesn’t the graph in Sourcetree display a new branch branching off from the master branch , when I create a new branch called “testing123” in terminal ? Sourcetree recognises the new branch but it doesn’t branch off from the master branch in the graph. Why is this happening ? How can I make Sourcetree […]
What is the perferred workflow to pull a published release branch from the central repo using git-flow? eg: Mike made a release branch, he published it through “git flow release publish 1.0″ Jane would like to work on that release branch too, how does she pull it from the central repo to continue working with […]
Alright, lets say one day we make happen to make a bunch of modifications and when we go to commit them we notice we were working on the wrong branch. How can we force git to switch branches without discarding local changes. I’m probably going to go about this in a naive way while I […]
The situation: Starting with the Master at A I branched and made some changes at B then merged that branch back in (C). After making some more changes I was at D but found I needed to deploy the code without the changes that happened in the branch. If I hand’t merged it that would […]
Is there an option like –author of git-commit for git-merge? We maintain a staging environment where some changes must be performed. Some limitations make us to use only one linux user to access staging environment. Anyway, we are a small team with cooperative initiative and we tell when doing commits, which one is the author […]
My organization is using git branching extensively. As a result, we have produced over 2000 branches in the past year. We are now trying to adopt a strategy for cleaning up all the old branches that are of some given age. I know how to delete branches, but I can’t find a straightforward way to […]
I have a remote repository that I’ve pulled and am branching from. I want to keep the new branch up to date with changes done to master. I’m thinking about the workflow below, does it make sense or are there are better ways to do this? Initial branching and checkout: git checkout master git pull […]
This is a follow-up on this question on creating branches. It strikes me as odd that I would still work on one repository because the files on my local machine will be a weird mix of different experiments. I would imagine the best-practice method is to duplicate the repository and work in different folders on […]
How do I shallow clone a git repository, so that my clone contains only 1 history item, and starts on a specific branch? I know how to do a shallow clone: git clone –depth 1 https://path/to/myrepo.git but not start the clone on a specific branch.
I find myself doing this a lot when cherry-picking a commit from another branch. $ git log -1 another_branch commit <commit_sha> // copy <commit_sha> $ git cherry-pick <commit_sha> Can I do all of this in one command, if so, what is it?