Tag: version control

How can I translate trunk/branch concepts from Subversion to Git?

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 […]

Remove commits before specific commit

Is there a way to remove all commits before a specified commit and use that commit as the initial?

Why doesn't the graph display a new branch branching off from the master branch, when I create a new branch in terminal?

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 […]

git untracked files – how to ignore/delete

When I run git status, I see the “Untracked files” section has many files (some with a “.” extension.) I don’t think I have to do anything, but it doesnt look good to see these files whenever I run git status. Is there any way to not to see these files?

What are the use-cases for local branches tracking other local branches?

In Git we can do this: $ git checkout -b testbranch –track master Branch testbranch set up to track local branch master. Switched to a new branch ‘testbranch’ What are the use-cases of such branches?

How do I manage an open-source and commercial version of the same project using source control?

We are developing an open source project, and we are using Mercurial for source management control. The Mercurial repository for this project is public (we are using Bitbucket). Now we have a client for whom we need to customize our open source software. These customizations must be kept private, so we probably need to create […]

How to delete a repository and add a new one in Android studio?

I was working with VCS enabled in Android Studio and pushed my code to a repository that I had created in BitBucket. However, now the team I’m working with has created a new repository also on BitBucket and I have to switch my entire project there. So how do I stop VCS in my current […]

How to list local commits difference in git

I have a remote repository cloned locally, and over time, I have added local commits to that cloned repository. Now, whenever I do git status, I see Your branch is ahead of ‘origin/master’ by xx commits message. Q: How do I list only commits made locally, so that I can examine these commits into more […]

Git rebase failing

I’m trying to rebase the work of a colleague. First, I get a ton of conflicts where <<<<< head seams to contain the new code. Then after a while I get the following error: fatal: update_ref failed for ref ‘refs/heads/dev_504’: cannot lock ref ‘refs/heads/dev_504’: ref refs/heads/dev_504 is at XXXXXXX but expected XXXXXXXX Could not move […]

git “revert” current directory

In svn it’s possible to do svn revert ./* in which the current directory and ONLY the current directory gets reverted. What is the git equivalent to svn revert in which only the current directory gets reverted? I know that there’s git reset –hard, but it reverts everything and not just the current directory. How […]

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