git

rails deployment question

I am trying to deploy my first rails app and struggling a bit. My plan is to initially host it on a heroku free account to get a feel for live deployments and do some production testing. Eventually I might move it to a VPS. I use git and do not use Capistrano at the moment. Heroku primarily uses git, which is fine, but git manages the...

Can't get rid of git submodule

I added some Haml templates to my Rails 3 project with git clone git://github.com/psynix/rails3_haml_scaffold_generator.git lib/generators/haml only to find, when I tried to edit some of those files, that this was a submodule, so I couldn't commit changes that I made within the lib/generators/haml directory. Now every time I git statu...

Code indentation converted from tabs to spaces: is it trackable in git?

I'm initially trying to adapt soft tabs in my projects but some testing with a python project tracked by git is showing issues; naturally git thinks everything has changed, and that is not what I'd prefer. While git diff understands to drop whitespace from comparison with -w switch, there's no such switch for git commit. Is the transit...

git rebase. How Do I Use it to Collapse Reams of Ancient Commits

Hello Git Geeks, I now have a big honking, bloated, Git repository consuming mucho disk space on GitHub that I want to put on a diet. I need to discard ancient commits made early in the history of the project that are are essentially irrelevant to the current direction the project is going. I am - and will always be - the sole user o...

Best practice to store .jar files in VCS (SVN, Git, ...)

I know, in the time of Maven it is not recommended to store libraries in VCS, but sometimes it makes sense, though. My question is how to best store them - compressed or uncompressed? Uncompressed they are larger, but if they are replaced a couple of times with newer ones, then maybe the stored difference between two uncompressed .jar f...

Difference between a branch, fork and clone in git?

Can someone help me understand the difference between a branch, a fork and a clone in Git? ...

Git hook to disallow directory creation in top level

Any better way to prevent stop top level directory creation by users may be while on push or direct file creation Thanks in Advance Dhandu ...

Can "git fetch" be told not to use "git upload-pack" for local repositories?

When using git fetch to fetch refs from one (very large) repository to another one on the local machine, git upload-pack takes a very long time to create pack files. In the local case there's not such a need to minimize the amount of data transported, and I don't care about disk space lost by losing delta compression, so ideally I'd pre...

Is "git push --mirror" sufficient for backing up my repository?

I'm a solo developer, working in a local Git repository. For backups, I want to send an exact copy of that repository off to another server. Is it sufficient to do this? git push --mirror I'm asking because I can sometimes run this command two or three times before Git tells me "Everything up-to-date", so apparently it's not an exact...

Git: how to unpack packed-refs?

Hi. I cloned a project from github with git clone --mirror. That left me with a repository with a packed-refs file, a .pack and an .idx file. For developement purposes I want to look at the loose objects, so I unpacked the objects with git unpack-objects < <pack file> which worked fine (I unpacked the pack file into a new repo if you're...

GIT pull from a bare repository

I have a GIT repo A which was setup using "git svn" from a subversion repo. I made a clone of A called B, where B is a bare repository(git clone --bare). I clone C from B, work on C and periodically push my changes to B (the reason I made B bare). Now, when I want to pickup the latest updates from subversion I run "git svn rebase" on rep...

Branch from *part* of main code, how to keep it up to date?

Was little bit difficult to formulate the title for my question since is kind of abstract... Let me try to explain. I have a main code which has a git repository, I decided to take part of that code and make it a stand alone app. with its own name and versions to be distributed. Is there a way to keep the main code and that other branc...

git: how to update (checkout) a single file from remote origin master

Hello, The scenario: I make some changes in a single file locally and run git add, git commit and git push The file is pushed to the remote origin master repository I have another local repository that is deployed via capistrano with the "remote_cache" method from that remote repository Now I don't want to deploy the whole application...

Git auto diff in some external text file

Hi all! Sorry for my English ;) I want to make something like auto-diff. For example, Im writing an article and want to paste there all my changes in project code. I hate writing code, then copy-pasting it to text editor, writing comments, then writing code again. Can somebody advice me any way to do smth like this: I edit my some u...

Is there a proper way to ‘sync’ branches and keep them separate?

So I created a new branch from master and eventually merge the changes back, only some changes seemed to merge and it would seem I merged in one direction. Eventually I just decided to be sure master received all the 'experimental' changes then I deleted the experimental branch and made a new one. So this question is turning into a few q...

Git will not init/sync/update new submodules

Here's part of the contents of my .gitmodules file: [submodule "src/static_management"] path = src/static_management url = git://github.com/eykd/django-static-management.git [submodule "external/pyfacebook"] path = external/pyfacebook url = http://github.com/sciyoshi/pyfacebook.git However, .git/config ...

Open source web-based code and changeset viewer for git

Know of any good ones? Looks like there were a few attempts at adding git support to Warehouse but it appears to be dead. I'm aware of Redmine but am looking for others. I host git repos with gitosis on my local server and want a way to browse it on the web. ...

Git: how to diff the same file between two different commits on the same branch?

On git, how could i compare the same file between two different commits (not contiguos) on the same branch (master for example)? Is it possible? (i'm searching for a "Compare" feature like the one in VSS or TFS) ...

What does the output of git pull actually mean?

I'm trying to gain a more thorough understanding of git. Can someone give me a simple line-by-line explanation of what basic git pull output means? Example: remote: Counting objects: 11, done. remote: Compressing objects: 100% (5/5), done. remote: Total 7 (delta 2), reused 0 (delta 0) Unpacking objects: 100% (7/7), done. From ssh://my...

Git commit squashing (rebase -i): how do commits actually work?

I don't quite understand how the commits are squashed with git rebase -i. There is one thing I was left wondering: If my rebase -i produces this list: pick A Last commit pick B Commit pick C Some other commit Should I squash commits A and B or B and C? Problem is git said in this case that it would rebase D..A onto D (D being the l...