Tag: git

Using Git on Windows, how do I ensure normalized line endings in repository and no conversion in work dir?

Using Git on Windows, I want to ensure normalized line endings in the repository and no conversion in working directory? We are now using .gitattributes files with * text=auto to ensure the Git repositories are normalized. When a .gitattributes file is used, all the text files in the repository are stored as LF. That is […]

Detach (move) subdirectory into separate Git repository

I have a Git repository which contains a number of subdirectories. Now I have found that one of the subdirectories is unrelated to the other and should be detached to a separate repository. How can I do this while keeping the history of the files within the subdirectory? I guess I could make a clone […]

Merging subtree split to another branch: Is it safe?

Suppose I have repository Foo with two branches: A and B. Branch A is an ancestor of branch B. Let’s say I setup a subtree in branch A, following the instructions in this guide. Once I have it all setup, what happens when I merge branch A into branch B later? Obviously I’d want branch […]

How to re-format the patch after merge in Git?

Let’s assume that there are two branches, master and slave, and they edit the same file and the same line. Initially, the contents of the file is foo bar then in the branch slave it is edited to become foo bar baz Now the user of branch slave formats the patch (git format-patch master) and […]

bookkeeping cleanup of equivalent changes across branches in git

I’m attempting to cleanup a large number of topic branches, primarily so that the branch overview for master in github no longer displays spurious “n ahead” indicators in inactive topic branches due to the presence of identical changes. Without these spurious indicators, this overview page would offer a great way to see at a glance […]

Open eclipse projects synced with git that are outside the workspace

I have a project outside of my eclipse workspace, and I am using git to update it, and I want to use eclipse to work on the files. But if I do import existing projects into workspace in eclipse, will it only copy the contents of the project at the time? So when I pull […]

What does “+1/-1” mean on git's output?

If I try to interactively add a file to git, git add -i I get this output: *** Commands *** 1: [s]tatus 2: [u]pdate 3: [r]evert 4: [a]dd untracked 5: [p]atch 6: [d]iff 7: [q]uit 8: [h]elp What now> 1 staged unstaged path 1: unchanged +1/-1 index.html I’m assuming this +1/-1 means that there’s one […]

Is it possible to remove a github account

I created an account on github.com. Now i want to delete it. I want to create another account. Is it possible ?

Git Stashing specific files before a commit

I’m not sure if what I’m looking for is a git-stash but here is what I want to do. I have configuration files customized for local use. Those files already exist in Git. Now, if I add a new feature (change other files), I want to stash my config and hit commit and only commit […]

Cannot apply Git patch (replacing a file with a link)

In a Git repository I would like to replace an existing file with a soft link to a file outside the repository. (Just to make things clear, I want to reference a file automatically generated by an external tool.) $ git rm FILE $ ln -s PATH-TO-FILE FILE $ git add . $ git commit […]

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