git

Imposing a Partial Ordering on Git Commit IDs

I'm converting the infrastructure at my workplace to use git instead of svn. The overall migration is going well, but we have a tool that I developed to do our SQL schema migrations. In order to deal with individual schema change dependencies, the migrations script used subversion keyword replacement to put the last-changed revision nu...

Learning version control with git first or via SVN?

Currently a group I am a part of uses SVN. We are looking at moving to git. I have used git personally (and am actually using git-svn to bridge back to the main SVN repository), so I am convinced of its benefits. One concern is that git is more complex than SVN. We have some brand new folk who will need to learn version control from th...

Multiple django-apps on python path or in project

I have a decent sized django project and when I originally built it I kept all the apps in an apps folder under the project root. project/apps/articles, project/apps/video etc. After a while I decided to move to best practices and make them more reusable so I moved them into their own separate apps then symlink'd them to my python path....

Django and VirtualEnv Development/Deployment Best Practices

Hi All, Just curious how people are deploying their Django projects in combination with virtualenv More specifically, how do you keep your production virtualenv's synched correctly with your development machine? I use git for scm but I don't have my virtualenv inside the git repo - should I, or is it best to use the pip freeze and t...

git changes modification time of files

In the GitFaq I can read, that Git sets the current time as the timestamp on every file it modifies, but only those. However, I tried this command sequence (EDIT: added complete command sequence) $ git init test && cd test Initialized empty Git repository in d:/test/.git/ exxxxxxx@wxxxxxxx /d/test (master) $ touch filea fileb ex...

Importing SVN branches (and tags) on git-svn

I have got a central SVN repository I must commit to, but I've got a passion for git (like any other developer I know). The case is well known. Then I read about git-svn and gave it a try. Since I don't need the full history, just from two months or so, I did like this: git svn clone -r 34000 -s https://svn.ourdomain.com/svn/repos/Proj...

git workflow incorporating many, but not all commits from many forks

I have a git repo. It has been forked several times and many independent commits are made on top of it. Everything normal, like what happens in many github hosted projects. Now, what exact workflow should I follow, if I want to see all that commits individually and apply the ones I like. The workflow I followed, which is not the optima...

Can I get a list of changed files in a git sub-folder between two commits?

I have a git repo containing many folders. I need to find out what files have changed in one of those folders between two commits. Is there a nice way of doing this? ...

Download only changed files git

I have forked a project on GitHub and I want to download only the changed files from the original repo. Is it possible to do this? ...

Change first commit of project with git?

I want to change something in the first commit of my project with out losing all subsequent commits. Is there any way to do this? (I accidentally listed my raw email, and I'd like to change it as I'm getting spammed from bots indexing github.) Edit/Addendum (whereby "listed my raw email" I mean listed my raw email in a comment in the ...

How share a config file in git ?

I have editor settings that I want to spread in all repositories. If the user defines its own settings, it should erase the repository choices of course. I want to do that because I have a class and every student clone the repo. Usually they forget to set the core.editor setting and ends up messing around with vi, usually crashing the r...

How to rebase one repo to another

Let's say I have two different repositories like so: Project 1: Init---A---B---C---HEAD1 Project 2: Init---D---E---F---G---HEAD2 Is there a way to rebase Project 1 (Init to HEAD) to the Init commit of Project 2 so it looks like this: Project 1 & 2: A---B---C---HEAD1 / Init---D---E---F---G---HEAD2 The content of Project 1 &...

how to detach alternates after git clone --reference?

I'm using git clone --reference to reduce network traffic over a slow connection. Now, git-clone's man page points out the dangers of using this and suggests git repack -a to break the link, which I'm doing immediately after the clone. What I'd like to know is - after I've done the repack, is it then safe to just delete .git/objects/i...

Elementary Linux scripting question

I'm trying to figure out how to work git filter-branch and I need help with some basic Linux scripting commands. 'git ls-files -s | sed "s-\t-&newsubdir/-" | GIT_INDEX_FILE=$GIT_INDEX_FILE.new \ git update-index --index-info && mv $GIT_INDEX_FILE.new $GIT_INDEX_FILE' HEAD Can anyone bre...

How to get git to pull changes for all branches

I'm working with a git repo that has an empty master and multiple branches. When I do a git pull, it only seems to pull stuff down for the master but does not apply for the branches. I find myself having to do git checkout branch; git pull for each branch before I can push. Is there a command or switch I can use that does Pull and app...

Can I fetch a stash from a remote repo into a local branch?

A colleague has a stash in their repository which I can access (via the filesystem), and I'd like to pull that stash into a branch in my repository. % git ls-remote ~alice/work/repo/ stash 3ccc82fb1ee0e7bde1250c7926d333ce21c109c0 refs/stash But when I try to fetch that, git tells me "unable to find 3cc82..." % git fetch ~ali...

Cloning a repository without making it the origin remote

I'm cloning a git repository from a computer that's going to be wiped. Is it possible to clone a repository without making the original repository origin/master? Or do I need to clone it, and then delete the remote branch (which is done with git remote rm origin)? Edit: The repository has only one branch, and no tags. ...

How can I give multiple users access to 1 git repo?

I'm setting up a git project and using my server as the central repo for my group members. My question is, how can I give multiple users access to that same repo? As it currently stands, I successfully gave myself access, and added a repo. However, when accessing the repo with [email protected]:projectname.git, it finds the project inside ...

Better way of making Git to turn a blind eye on my changes

Is there some cleaner way to make Git just ignore some of my changes and never commit them? .gitattributes: config_to_be_deviated.xml filter=qqq .git/config: [filter "qqq"] clean = "perl -ne 'print unless /git_please_dont_look_here/'" smudge = (Q=$(mktemp) /tmp/pp I can continue adding and committing useful changes to config_to...

How can I apply a patch

Hi, I have 2 git local repository both pointing to the same remote repository. In 1 git repository, if I do 'git format-patch 1', how can i apply that patch to the other repository? Thank you. ...