Remove deleted files from git history

I’m trying to split a subproject off of my git repository. However unlike in Detach (move) subdirectory into separate Git repository I don’t have it in it’s own subdirectory (and moving it in and doing the above only yields the history after the move). I’ve cloned the branch from which I want to split off […]

How to make a git repository read-only?

I have some git repositories accessed remotely through SSH and I want to make some of them read-only to prevent more pushes. Some people have remotes pointing to these repositories. These bare repositories were initialised –shared=group, so is setting file permissions to 660 for all files good enough to still allow SSH access, but disallow […]

Why can't I use TortoiseMerge as my git merge tool on Windows?

I’m trying to perform my first Git merge ever (exciting!), but can’t get Git Gui (0.13.GITGUI from Git 1.7.4.msysgit.0) to recognize TortoiseMerge (1.6.11.20210 x64) on Windows 7. Based on an answer to a similar question, I’ve made the following configuration changes: $ git config –global merge.tool tortoisemerge $ git config –global mergetool.tortoisemerge.cmd ‘TortoiseMerge.exe -base:”$BASE” -mine:”$LOCAL” […]

What would I use git-worktree for?

I read Github’s post on git-worktree. They write: Suppose you’re working in a Git repository on a branch called feature, when a user reports a high-urgency bug in master. First you create a linked working tree with a new branch, hotfix, checked out relative to master […] You can fix the bug, push hotfix, and […]

Do I need to publish to npm every time I update a package available via git?

Say I maintain an incredible crab-season package. I’ve npm published version 0.1.0 with a package.json containing: “repository”: { “type”: “git”, “url”: “https://github.com/example/crab-season.git” } When I add awesome new features, bump the version to 0.2.0, and push to github will the npmjs registry notice my new version or do I need to npm publish each time?

Git: a tool to manage and to structure Projects?

I want to learn project design and structuring Git -repositories. There are tools such as Maven for Java projects here but cannot find anything for Git. Maven threads look poor-quality, except this one here — warning poor-quality threads: here, here, here, here — Y (more). So I surely want to use something else to it! […]

git branch vs $(git branch)

When I execute git branch on the command line I get a list of all the branches on a repo, however when I execute $(git branch) in a sub-shell, it first prints out a list of files in the top level folder in a repo before printing out the branch names. Why? I’m basically trying […]

How do I git clone –recursive and checkout master on all submodules in a single line?

I really like this command to fetch a repo with submodules: git clone git@github.com:my_user/my_repo.git –recursive However, the submodules are all set to “no branch” when they arrive, and I have to manually checkout master on each and every one. Is there a way to recursively pull submodules and automatically set the branch to master?

git subtree: possible to change subtree branch/path in a forked repository?

In a repository A the folder sub is included as git subtree of the repository S – pointing to master branch. I have forked repository A into F. Now I want to do one of the following in F: change sub to use a different branch of S (ie develop branch) or: change sub to […]

pushing to a git repository does not work

I am just starting out with GIT (i’m coming from cvs) and would like to set up something akin to cvs/svn with Git. I performed the following steps: cd o:/repository git init cd <working directory> git clone o:/repository i now created a file called file.txt with some content doing a “git status” lists appropriate changes. […]

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