git

Why is git submodule update not automatic?

When switching branches with git checkout I would assume that most of the time you would want to update your submodules. In what situation do you not want to update submodules after switching? What would break if this was done automatically by git checkout? Updated with example: Branch A has submodule S at 3852f1 Branch B has submo...

Falling back to rsync, etc if git isn't found

I keep all of my dotfiles in a git repository. This works out fine for me, but the problem is that I use a couple servers at work that don't have Git on them, and which I'm not really allowed to put Git on. Basically, I'm wondering what the best way to implement a fallback plan for syncing my dotfiles would be for situations where git is...

Using Git with Visual Source Safe 6.0

Hello everyone, Sorry for this horrid, horrid question.. but there's no way for me to not use VSS. I would like to be able to use Git locally for branch development, etc. while using Visual Source Safe 6. My knowledge of all of the ins and outs of Git is limited at the moment, as I'm a recent convert. Question: What I would like to ...

How to remove unreferenced blobs from my git repo

I have a GitHub repo that had two branches - master & release. The release branch contained binary distribution files that were contributing to a very large repo size (> 250MB), so I decided to clean things up. First I deleted the remote release branch, via "git push origin :release" Then I deleted the local release branch. First I tr...

How to reorganize the repository after deleting and renaming folders?

Hi, I had solution which consisted of two projects - ProjectName and ProjectName v2.0 At the beginning I didn't use the version control so I duplicated everything (copied Project name and named it ProjectName v2.0). After a while I started to use Git and added the folder v2.0 (Git add "ProjectName v2.0"). Later on I deleted the original...

beginner question: how to do a simple merge?

want to get file_3 by merging file_1 and file_2 if manual merge needed, text editor or merge tools can be used. preferably file_3 is in git merge like format. file_1 is in git, but both with or without git to do the merge is fine on Linux. ...

How can I create a new branch in git from an existing file tree?

I am looking to add an existing file tree to a git repository as a new branch (I can't just copy the existing tree into my git tree, since the existing tree is versioned under a different VCS, and I am trying to sync them up). Is this possible? EDIT: Would setting up a new git repository, that is connected to the existing remote reposi...

git stash apply version

I really hope someone can advise. I have 2 branches master | design Working in design I did a stash and switched to master made some adjustments. Switched back to design and done a stash apply only to loose all my changes in the design branch. I am hoping all my work is within a stash as I have not cleared or removed these. If I do a...

"git merge -s theirs" needed -- but I know it doesn't exist

I have a number of remote repositories that I want to merge together. Some of the subtrees in those repositories are unique to the remote (they contain data that is host-specific), other subtrees contain data that is (supposed to be) common across all remotes. What I want to do, essentially, is run "git pull " for each remote. This wi...

How to apply git diff --binary patches without git installed?

I use to git diff to generate patches that can be applied to remote server to update a project. Locally, I run: git diff --no-prefix HEAD~1 HEAD > example.patch Upload example.patch to remote server and run: patch --dry-run -p0 < example.patch If dry-run is successful, I run: patch -p0 < example.patch This works well, except wh...

Git: 1.List all files in a branch, 2.compare files from different branch

Looking for a command like 'ls -R' or 'dir/s' can list all files in a commit/branch. Is there any command can compare two files from different branch? Thanks! a lot! ...

Git and binary data

I'm currently starting to use git for my version control system, however I do a fair bit of web/game development which of course requires images(binary data) to be stored. So if my understanding is correct if I commit an image and it changes 100 times, if I fetch a fresh copy of that repo I'd basically be checking out all 100 revisions o...

Git: clone a specific branch

Git clone will behave copying remote current working branch into local. Is there any way to clone a specific branch by myself without switching branches on remote repo? Thanks ...

How to emulate 'git stash' in fossil, bzr?

Is it possible to emulate the behavior of 'git stash' when using fossil/bzr? Basically I'm interested in handling the following workflow: at some point the source code tree has state X, it is commited I proceed to writing new code, I write it for a while and I see the opportunity of a refactoring I can't commit at this point, because ...

Work with Git and SVN at the same time

Hi! I am participing in a Free Software Contest, and we have to use a forge that uses GForge, with only support for SVN, but I will like to use Git (using gitorious) for example. There is a simple way to get two repositories (one on SVN and other with Git) updated more or less at the same time? ...

How can I get the version number of git running on server?

I'm a git newbie. I'm working on a project on GitHub, and I have some problems (I'll detail them in a later posts if further checks don't succeed) pushing my commits to remote repository. I'd like to check which version of git is running on GitHub servers. Is there any git command to perform such task? Thank you. ...

Has Gitorious hooks for CIA commit notification?

As I am running out of my space on GitHub on my free account (yes, I am considering upgrading), I am setting up new git repositories on Gitorious (see also GitHub vs Gitorious). One great feature of GitHub is the post-commit hooks, that allow me to notify the (also great) CIA network... However, I have been unable to find if Gitorious s...

Git view latest log message for specific file in remote repository

Hi, I'm using a local Git project repository, and have created a remote repository followed by pushing the contents of my local repository to the remote repository using the git push origin master command. I can now perform commits and other tasks just fine. What I'm trying to do now is retrieve the latest commit log message for a spec...

Has anyone tried vss2git?

OK, so I have started a contract where they are using (gulp) Visual SourceSafe and are looking to move to something better. I have recommended Git. I stumbled across vss2git, which looks useful for migrating from VSS. Has anyone used it? Many thanks! ...

Set up git to pull and push all branches

I'd like to push and pull all the branches by default, including the newly created ones. Is there a setting that I can define for it? Otherwise, when I add a new branch, locally and I want to pull it from the server, what is the simplest way to do it? I created a new branch with the same name and tried to pull but it doesn't work. Ask...