Tag: version control

File changed on one branch changes on both branches

I’m experimenting with Git on my machine. I cloned some repository and added a new branch my_branch. In this branch, I edited a row in one source file. I didn’t add the change, and obviously didn’t commit it. I then switched again to master, and looked at the file on the disk. The change appeared […]

How to know what branch I am on git when checkout origin/<branch>

We have a script that actually does git fetch; git checkout origin/<branch> to deploy a certain feature. The reason why we do this is that we wan’t to avoid local branches (it’s a test server), so the script just fetch the latest changes and checkout into it, then reloads the server. We also generate a […]

gitosis and git clone problem

I have installed gitosis, but i have strange thing when i’m working with repos. In config i have [gitosis] [group gitosis-admin] writable = gitosis-admin members = me@server me@laptop [group prj1] writable = prj1 members = me@laptop and in /home/git/repositories i have created directory prj1.git with empty git repo. i can work with gitosis-admin from server […]

How to version control overlapping folder structures?

Been thinking on this for ages, really interested in any suggestions. A simple Unity game project looks like this, with a Git repo at Root. Root ├─Assets │ └─Game files └─Project files As I develop numerous plugins over time, the resulting structure will look like this. Root ├─Assets │ ├─Plugins │ │ ├─Plugin_A │ │ […]

Git branching for new product variation

I’m using git to manage a repository I’m working on. the master branch is the “main” project. However, I’m also working on a parallel product that is similar but not the same as the main product. It lives in a branch called newproject. The code base is very similar between the two, but newproject is […]

Git number of commits per author on all branches

I’d like to get the number of commits per author on all branches. I see that git shortlog -s -n Prints a very nice list but it is not counting the commits that are not yet merged from other branches. If iterate this command over every branch then obviously the common commits get counted multiple […]

Is it possible to have a tracked .gitignore AND an untracked .gitignore?

I am collaborating on a project with others, and there is a .gitignore in the root directory which is committed to git. What if I wanted to make a new file or directory in root that I want git to ignore, but I don’t want to put it in the public .gitignore, simply because it […]

Which is official GUI of Git for windows?

Which is the official GUI of Git for windows? I’m confused between git-scm and msysgit. I know there is one GUI from github too but I want to use bitbucket for private free hosting too and I think Official github gui of windows will not work with bitbucket. So I want to learn use of […]

How to prevent git stash dropping changes to files with the “assume unchanged” bit?

I have used git update-index –assume-unchanged on some files to keep my changes to them from being committed. When using git stash in the repository, those changes are stashed along with any other outstanding changes. This is expected behaviour, however git stash pop doesn’t bring them back, so the changes are just lost. Anyone know […]

An error was raised by libgit2. Category = Os (Error)

I have run into this several times now: An error was raised by libgit2. Category = Os (Error). Which sometimes causes this or similar error while i am writing code: Failed to open ‘…/App_Data/….mdf’: The process cannot access the file because it is being used by another process. When this happens i can’t code without […]

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