git

How can I transform a remote none-bare repos to a bare reopos without re-clone in local machine in git?

I have a remote machine RemoteMachine which hold the clone of another MachineWeNotConcern with: git clone MachineWeNotConcern/prj prj My local machine clone like this: git clone RemoteMachine/prj local_prj Now I want to make the RemoteMachine's repos to bare(how?) as if I checked with: git clone --bare MachineWeNotConcern/prj prj ...

Add svn repo to existing git repo?

I know you can track a svn repo with git by using git svn init, however that is for if you want to create a brand new repo. My situation is that I currently already have an existing git repo and want to track the trunk of a svn repo by making it a remote branch in my current git repo. Any suggestions? UPDATE: After searching last nig...

How to search through all commits in the repository?

I have a git repository with few branches and dangling commits. I would like to search all such commits in repository for a specific string. I know how to get a log of all commits in history, but these don't include branches or dangling blobs, just HEAD's history. I want to get them all, to find a specific commit that got misplaced. I ...

What's the best practice for collaborating with git in the following situation?

Bob and Alice got the ssh access to a RemoteMachine, they work together with ProjectA. Assume Alice has a repos in her home directory RemoteMachine/home/alice/ProjectA while Bob will firstly clone Alice's repos to (with --bare is better maybe) RemoteMachine/home/bob/ProjectA Bob will not edit ProjectA directly in the RemoteMachine...

How to git-svn clone the last n revisions from a Subversion repository?

Problem How do you create a shallow copy with git-svn from a Subversion repository, i.e. how do you pull only the last three revisions? The git clone command can get the last n revisions from a Git repository if you use the option --depth, i.e. you get a shallow copy of the repository. Example: git clone --depth 3 git://some/repo mysh...

How do I convert simple non source controlled project backups into a versioned git repository?

I have been extremely naughty. I have been developing a piece of software (I'm the only developer) for a little while (O.K., it's over the course of a few years), but have not used any sort of source control. I have resolved to use source control (git seems most likely, as the windows tools seem to have come on a lot on the last few mon...

How do I change the author of a commit in git?

I was writing a simple script in the school computer, and commiting the changes to git (in a repo that was in my pendrive, cloned from my computer at home). After several commits I realized I was commiting stuff as root. Is there any way to change the author of these commits to my name? ...

Concurrency in a GIT repo on a network shared folder

Hello, I want to have a bare git repository stored on a (windows) network share. I use linux, and have the said network share mounted with CIFS. My coleague uses windows xp, and has the network share automounted (from ActiveDirectory, somehow) as a network drive. I wonder if I can use the repo from both computers, without concurrency p...

What VCS allows me to add changes to multiple pending commits simultaneously?

My workflow usually involves me making multiple changes to a file, each of which belongs to it's own conceptual unit of change across the project (= commit). What I would like to be able to do is to add certain diffs (either a whole file, or only certain lines of a file) to a pending commit (which would probably have to be named) and to...

Git clone hang

As a prospective Linux developer I want to clone the git repositoy of Torvalds. The problem is when I call the git clone after some time the git clone process just hang. No error message no timeout nothing. So I press ctrl+c and I restart and again, same thing. It hang at random percentage. It hang during the "Retrieving object" process...

git push/pull times out

I can't git push/pull to github from my corporate vpn: git push origin master ssh: connect to host github.com port 22: Connection timed out fatal: The remote end hung up unexpectedly I assume this is a firewall issue, b/c if I disconnect from the vpn it works. Is there anything I can do to work around it? Or am I stuck disconnecting f...

Resolving Git Svn Conflicts

I'm using Git-Svn to interact with a Svn repository at work and I can't seem to find a way to effectively resolve conflicts for the life of me. I've read the other questions on this topic, but evidently I need something even more remedial because i always seem to end up in some kind of endless loop. I rebase, use mergetool (meld) to reso...

Flexible vs static branching (GIT vs Clearcase/Accurev)

My question is about the way in which GIT handles branches: whenever you branch from a commit, this branch won’t ever receive changes from the parent branch unless you force it with a merge. But in other systems such us Clearcase or Accurev, you can specify how branches get filled with some sort of inheritance mechanism: I mean, with Cl...

Git commit permissions error when working on a remote host

I'm trying to get my website under version control. I work directly on the server with ExpanDrive, which uses MacFUSE to mount the SFTP connection as a local volume which I can access with the terminal and other local applications. Anyway, everything goes smoothly until I try to commit, when I receive this message: fatal: exec .git/hoo...

GitPlugin for Trac doesn't work every few requests

I've set up and configured Trac with the GitPlugin (http://trac-hacks.org/wiki/GitPlugin) but for some reason every three or so requests to Trac pages, I get the error: Unsupported version control system "git". Check that the Python support libraries for "git" are correctly installed. After a refresh or two, it goes along happily bein...

What are effective methods to manage ownership of programs in source control systems?

Using SVN or Git the thought had occurred to me to use the directory structure as a meta data place holder. Each team would have a directory in a shared repository for their code. The more I think about it though the worse the idea seems. The reason it appears like a bad idea to me is that teams are not static entities. Teams can van...

What is a quilt patchset?

There is a git command called git-quiltimport. Its man pages says it "Applies a quilt patchset onto the current git branch, preserving the patch boundaries, patch order, and patch descriptions present in the quilt patchset." However, it doesn't define what a "quilt patchset" is. What is a "quilt patchset"? ...

How do I tell Git to ignore ".gitignore" ?

I just did a git init on the root of my new project. Then I created a .gitignore file. Now, when I type "git status", ".gitignore" appears in the list of untracked files. Why is that? ...

Vendor Branches in GIT

A GIT project has within it a second project whose content is being worked on independently. Submodules cannot be used for the smaller, as even the subproject must be included when users attempt to clone or download the 'parent'. Subtree-merging cannot be used, as the subproject is being actively developed, and subtree merging makes it...

Can I force git diff to treat a file as a copy?

The diff functionality in git has "copy detection"--if it detects that a new file is actually a (possibly modified) copy of an existing file, the diff output shows the differences between the source file and the new file rather than just a bunch of additions from a blank file to the new file. As far as I can tell, git diff uses some heu...