git

git and empty folders

so I see git doesnt recognize folders, or should I say when the only change between commits is addition of empty folders to the working tree they're not show in 'git status' after 'git add .' how would you handle the need to add empty folders to the working tree (for runtime storage) and have them be reflected/created when other repos pu...

How to merge two remote repository.

I want to merge two remote repository. one is mainstream repository, which i did not have write permission. i want to track its master branch. the other is maintaned by us, i have full rights on it. i want to track the mainstream code. at the same time, our modification would be recorded in my remote repository. please give me an ex...

git and removing files

so the only way to remove files froma working tree and have git register it and incorporate that change in future HEAD's is to use 'git rm'? I just want to be sure. I've been using regular bash 'rm' for a bit now and git is never picking up on those file/dir deletions, and it was bugging me why it wasnt. thank you ...

Choosing a source control system: logical next steps after VSS

I've been using Git for the past few months and love it. I looked into how to host it in a corporate environment. Considering a 10 person team who use Visual SourceSafe, programming in Coldfusion, Powerbuilder, PHP and a bit of .NET, I found, to my surprise, that the Git 'server' tooling is still fairly rudimentary. http://stackoverflo...

In git, how do I remove a commit from one branch and apply it to a different branch?

I have two branches off of master, each one for a different feature, and then I have a synthesis branch that combines the two. I committed something to the synthesis branch, but now I see I would have rather applied that change to one of the branches particular to that feature. Is there a way to do this unapply/apply somewhere else man...

GIT submodule fatal: cannot describe

I am trying to add a git submodule to my project, but git keep telling me $ git submodule fatal: cannot describe 'dd650e8bb4762a8a7f69a6412b4765c9bb108778' What means "fatal: cannot describe" and how can i avoid this? ...

Github and SVN Workflow

I'm working on a project with 2 more developers. The problem is that 1 developer is using SVN and the other developer and I using github. Is there a way to keep everything synced on both sides SVN and git? ...

Restore previously removed code (not necessarily single or whole file) in git

I removed a class a feature from my code a while back and committed the removal. The feature was implemented as a single class with a BDD-style spec and a few other classes were altered in the removal commit as they made use of the feature. The commit is clean, in that the only change in the commit is the removal of this one feature. N...

Hudson infinite loop polling for changes in Git repository?

The git plugin for hudson works well. However, the build script must update a version number in the files in the repository, commit, and push back to the repository. When Hudson polls next to check for changes, it goes into an infinite loop because it sees that commit as a "change" builds again, which commits a change, so it builds agai...

Filter lines by pattern in bash script

Hello! I have two variables, one with text, and another with patterns. And I want to filter out lines, matched patterns. How can I do that? My script looks like this # get ignore files list IGNORE=`cat ignore.txt` # get changed files list CHANGED=`git diff --name-only $LAST_COMMIT HEAD` # remove files, that should be ignored from cha...

developing at home and office, would GIT be easier than SVN using xcopy?

If, for security reasons, source code can only be stored on my home computer and office computer, which source control would be best IF the only method of transporting the code would be a USB key? SVN or GIT? note: there is no network connection between the 2 computers. ...

Git submodules: Specify a branch/tag

How does git submodule add -b work? After adding a submodule with a specific branch, a new cloned repo (after git submodule update --init) will be at a specific commit, not the branch itself (git status on the submodule shows "Not currently on any branch"). I can't find any information on .gitmodules or .git/config about the submodule'...

How to clone a single branch in git?

I have a local git repository called 'skeleton' that I use for storing project skeletons. It has a few branches, for different kinds of projects: casey@agave [~/Projects/skeleton] git branch * master rails c c++ If I want to check out the master branch for a new project, I can do casey@agave [~/Projects] git clone skeleton new ...

Not able to create repository

I installed GIT and Cygwin GIT client. When command window opens, and $ prompt appears, I type in: Git Init It says: Baash: Command not found. ...

Mercurial Bookmarks and 'Git like branching'

I am not having any luck using Bookmarks in Mercurial for Git like branching. From the article: http://mercurial.selenic.com/wiki/BookmarksExtension, I've set "track.current" to true in my .hgrc file. Excerpt below: By default, when several bookmarks point to the same changeset, they will all move forward together. It is pos...

How does git detect a file modification ?

I don't have the knowledge to look at the source code of git. How does git detect a file modification so fast ? Does he hash every file in the repo and compare SHA1 ? This should take a lot of time. Or does he compare atime, ctime or mtime ? ...

How would you store encrypted information in public DVCS repository?

Hello Everyone, I have projects that multiple developers are working on. We all work off the same git repository. Currently, I do not store production server configuration in the repository, because the configuration files contain database credentials. I would like to start storing these configurations in the repository, so I'm thinki...

git not responding to my rails vendor/plugins directory

My git works fine in my app, except it doesn't respond to my vendor/plugins/paperclip directory. I can make a change in vendor/plugins/whatever and git status will show it, but not in vendor/plugins/paperclip. My .gitignore file only gas log* and public/system in it. I'm pretty stumped...searched google & asked in IRC, but nothing. Any i...

git error - failed to push some refs (pack-objects died with strange error)

I'm getting an odd error when I try to push to a new remote repository. I'm a git newbie, but following some tutorials, I was able to setup a few test repositories on a remote server and push to them. But the main repository I want to push up is giving me trouble. Here's what I did. On the remote server I created a new directory. I then...

Remotely Track the Current Branch in Git

I'm moving my continuous testing to a dedicated server (autotest slows down my local laptop too much). What I'd like is for my testing server (which happens to be running CruiseControl.rb) to be continuously getting my latest (committed) changes via Git -- ideally, without any changes to my own workflow. I am the only developer working o...