git

Startup script on EC2

I've created a custom Amazon AMI (Fedora) runs a few scripts and then shuts down. The problem with AMI's is that if my code changes there has to be a way for the AMI instance to get the latest scripts before it executes them. I wrote a shell script & put it in /etc/init.d/nt_startup To keep the code up to date, I execute a "git pull...

Is it possible to alias a branch in Git?

I am looking into using git on a massive scale. I was hoping to increase adoption and make things easier by calling the master branch trunk. This can and will give SVN users some feelings of comfort. I know I can create a branch called trunk but that seems to deviate from the git norms and might cause some users to get confused. I kn...

How can I install Git to my server which does not have apt-get?

My host is Bluehost. My server is on Linux. I have tried to follow the tutorial. ...

How can I put $HOME/opt/git/bin to my PATH?

I tried to include the following unsuccessfully to my ~/.profile: export PATH='$HOME/opt/git/bin' It seems not to work because $git gives me nothing. I am trying to install Git. I have also tried commands here. ...

SQLite table with Git merging

I have a log file stored in an SQLite database which I would like to distribute in a git repository. Later on I would like changes to the log file to be merge automatically with the original. Is this going to work? Will an automatic binary merge into an SQLite file blow up more often than not? ...

Can't git fetch through SSH

I've setup a git repository one a remote server. Now I'm trying to checkout from it with: git fetch ssh://[email protected]/~username/workfolder/ but I get an error: fatal: Not a git repository What am I doing wrong? Could it be the server does not support Git+SSH? ...

Setting Git for a team of 3 people?

The post aims to summarize all pieces of information to set up a closed repository for 3 people in a competition. Please, feel free to add a problem to the list which I have not noted. Please, add each answer to each question as a separate answer. Situation A: Drafts and files can exchange between 3 people. The writer can only push fil...

Git4Idea plugin not taking advantage of the git index

The Git4Idea plugin automatically adds changes to the index even with the improved git support in the new Intellij IDEA version 8.1. There's even a post on the Jetbrains forum about this issue without any replies. According to Embracing the Git Index Linus Torvalds once said "If you deny the Index, you really deny git itself." If you ...

Setting a password for Git cloning?

I want to put a password to my repository so that the password is asked, when cloning from my repository. ...

git push email notification

How do I configure the appropriate git hook to send a summary email whenever a set of changes is pushed to the upstream repository? ...

Assigning Git SHA1's without Git

As I understand it when Git assigns a SHA1 hash to a file this SHA1 is unique to the file based on its contents. As a result if a file moves from one repository to another the SHA1 for the file remains the same as its contents have not changed. How does Git calculate the SHA1 digest? Does it do it on the full uncompressed file conten...

How to restore Git after fatal file system error?

What is the fastest path to restore a git repository after a file system error on the main server? Imagine the central server of your OSS project fails and all commits for two days are lost after restore. How do you get those back? Is it enough just to call "git push" on all clients? Or is there something else I must take into account? ...

Pushing a server by Git?

I have tried the following command unsuccessfully: git push 12.12.12.123:/proj.git master It asks my password, but each time it rejects it. I used the following commands to set up Git: git --bare update-server-info chmod a+x hooks/post-update The last command gives me this error: chmod: Cannot access 'hooks/post-update':No such f...

How can I install Gitosis to my server without sudo access?

I am trying to follow these commands. I managed install Git to my server without sudo access. However, I need sudo access to add a new user: See this. It seems that Gitosis is very hard to install without sudo access. ...

How do you reverse the relationship between a git repository and its clone?

A git clone is set up to support pushing/pulling back into the original repository. How do I use git-remote (and/or other commands, configuration files, etc.) to change the two repositories such that the original will now act like the clone, pushing and pulling into it by default, and the clone will now act as the original, with no know...

How to search a git repository history to find a merge error?

At some point in our past branches of development in git were merged. However, the wrong merge decision was made and therefore some code didn't make it into master branch that we expected would be there. (There were multiple merges of different branches before a final merge to a master branch. So the branching and merging history was...

How to achieve the below with Git ?

Problem statement The entire codebase was accessible to everyone till now. Now I need to enforce people get code of only those modules which they will work on, for other modules they will get a library as in lib. Assuming we have two modules right now thinkbot (HEAD) -> assemblebot (tree/subdir) -> include -> source -> lib -...

How to announce backward incompatible changes in OSS project?

Sometimes you need to introduce backward incompatibile changes, when the improvements far outweighs the downsides. It is possible to easily switch to old behavior, but the user must be aware of such changes. Therefore the question is: how to announce future backward incompatible changes to FLOSS (open source) project, so that users can ...

Git: how to merge my local, working changes into another branch

How can I do this in git: My current branch is branch1 and I have made some local changes. However I now realize that I actually meant to be applying these changes to branch2. Is there a way to apply/merge these changes so that they become local changes on branch2 without committing them on branch1? ...

VCS and single developer "team"

I am a single developer working on a project for my company. I use subversion and Trac (for bug-tracking and communication with management types). I have a staging server and a production server. Today I checked in some code and discovered that my FSFS-based svn (v1.4) repository is irreparably corrupt. While this is quite a bummer it ha...