How do I find out which remote git branch I checked out?

git checkout origin/some_remote_branch … > You are in ‘detached HEAD’ state…. How do I later find out what I checked out?

git submodule has “new commits” when I checkout master

I have a submodule called Helpers. When I clone my main project with –recursive, the Helpers submodule is in a detached head state (as all of the tutorials say it should be). If I now ‘git status’ in the main project directory, everything is clean. If I ‘cd Helpers; git checkout master’, I would expect […]

How to load separately submodules included in a project?

Let’s say i have a project in a git repository with two submodule A and B. I clone my project and then to load the modules i have to do git submodule init git submodule update This will download all my module. There’s a a way to select only module A or only module B, […]

R: Git + Shiny server automated deployment

I have a Shiny server installation, and a Git repo for my Shiny application. I develop my Shiny application and push it to the Git repo, and I would like the Shiny server to load the latest version of the application from the Git repo. How can I do this? I currently manually update the […]

Gitlab backup without repository commits

I have a gitlab instance running; some repositories are over 400MB, and I don’t want those to be backed up. I want to back up all gitlab configs, users keys, and projects with issues. In other words what I want to do is keep backups and when I restore a backup get everything except repository […]

Git rebase original project

I have forked a project. I am the sole maintainer. Now the original project has changed its master branch. Can I merge those changes in my development branch or in both my master and development branch? I read about rebase but I’m not sure that’s how it should be done in this case.

git archive –format=tar HEAD:mydir/ | tar t -> fatal: current working directory is untracked

I’m trying to archive a folder in my git repository: git archive –format=tar HEAD:mydir/ | tar t However, the error message I’m getting is: fatal: current working directory is untracked The instructions I followed were here. My git version is: 2.1.2 A google search only came up with 6 links, all of them a few […]

How to maintain code review history in Stash pull requests

We use Stash and create pull requests when a feature branch needs merging with our development branch. We have a standard, that each implemented feature takes a single commit in the development branch. The way we achieve this is by working on features in feature branches and then squashing all commits into one. At that […]

Missing branches cloning a non-standard svn repository using git-svn clone

I am a complete git newbie and I want to clone my svn repository using git-svn. However, the branches are missing after the clone command is run. The repo layout is as follows: trunk/ branches/team/releases/release-1 branches/team/releases/release-2 … branches/development/user1/feature1 branches/development/user1/feature2 branches/development/user2/feature3 branches/development/user2/feature4 … tags/release1 tags/release2 The command I’m using is: git svn clone –trunk=/trunk –branches=branches/*/* –tags=tags/*/* […]

git gui cannot start because of bad version number

I’m running an ancient Ubuntu and after the automatic update, git-gui stopped working and complains instead: Error in startup script: expected version number but got “1.7.0-” while executing “package vsatisfies $_git_version 1.7.0-” (file “/usr/local/libexec/git-core/git-gui” line 1) My “fix” was to revert /usr/lib/git-core/git-gui as follows 1286c1286 < if {[package vsatisfies $_git_version 1.7.0]} { — > if […]

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