git

Deploying websites with git security

I have website that is under version control. To make it easy to deploy it to the server i am thinking about cloning the repo to the server and whenever i want to update the pages just pull changes from the server. From security point of view is this a bad idea to leave .git folder lying around on the webserver ? ...

Custom git diff to ignore some conflicts

Hello, I'm starting tests to move from cvs to git, and I have a problem on all my tests. We maintain a custom copy of FreeBSD sources, so in cvs we do the following when a new FreeBSD version is released: Import new freebsd src as a vendor branch Merge changes on HEAD I tried to do the same with git, and it worked, but almost all F...

committing to the same branch with git

Let's say that there are two people working on a git branch, they check out at the same time but one of them commits first and then the other commits after, will the newest commit still be merged with the former commit. or can multiple people work on the same branch simultanious? ...

Git: access denied when pushing to remote repository

I am a newbie with git but seem to have a problem with pushing a git repository over a network. Here is what I do to recreate the problem: create a new git repository on the computer to push to mkdir ~/git/test.git cd !$ git --bare init-db On my local computer I then create a new git repository and add a random file to it: mkdir test g...

Changing remote repository for a git submodule

I've created a git repository with a submodule in it. I'm able to tell the submodule itself to change its remote repository path, but I'm not sure how to tell the parent repository how to change the remote repository path for the submodule. I wouldn't be surprised if I'm somewhat out of luck and have to do things manually, as even delet...

Keeping changes against a moving target (such as Linux) using git.

I have a set of changes which work perfectly against a certain linux version, say 2.6.25.4. I have a git tree, and created a tracking branch vanilla-2.6.25.4 from the tag v2.6.25.4. I created a branch from this called my-changes-2.6.25.4, and did all my work. Now, I would like to rebase my work on top of an arbitrary newer version of ...

Simple tool to 'accept theirs' or 'accept mine' on a whole file using git.

I don't want a visual merge tool, and I also don't want to have to vi the conflicted file and manually choose the between HEAD (mine) and the imported change (theirs). Most of the time I either want all of their changes or all of mine. Commonly this is because my change made it upsteam and is coming back to me through a pull, but may b...

git reference books

Hi! I've learned what I know of git online. Now other developers at work need to learn it too, and we want to try to purchases books for that. I found two options: O'reilly's "Version Control with Git" amazon "Pragmatic Version Control Using Git" amazon In the descriptions I read, O'reilly's seems to give more examples, typical wor...

Unable to diff files in two separate branches in Git

I have FileA in branchA and FileB in branchB. The problem is that I can access only one file at time. I would like to be able to compare the files by FileMerge or meld, since they are the only diffTools whichI have found for Mac. How can you diff by meld/FileMerge the two files? [Solved]: 1st developed Problem: FileMerge does not al...

In Git, is there a way to get the "friendly" name for an arbitrary commit?

In Git, there are numerous ways to refer to a commit, including the full SHA hash or a shortened form of the hash (say, the first 6 characters or so). You can also name commits using a "friendly" syntax, like HEAD, HEAD^, HEAD^^, HEAD~3, and so on. Given an arbitrary commit in SHA hash form, is there a tool in Git to find a "friendly" n...

Are git submodules the only safe way to have working copies within working copies?

In my scenario, I have a program that analyzes data input files and produces other data output files. I want to version control the program, and I want to version control the data files, and as a matter of preference, I want to have the working copy of the data files within the working copy of the program. I want the program and data to ...

Trying to get started with git

I'm trying to get started using git, but I'm having some troubles right away. I'm using Git GUI for Windows. Keep in mind I've never used version control before and don't really know how it works. What I have is a Code::Blocks C project in a folder on my laptop's hard drive. I opened Git and created a new repository on a USB hard drive....

Howto extract a git subdirectory and make a submodule out of it?

Hi, I started a project some months ago and stored everything within a main directory. In my main directory "Project" there are several subdirectories containing different things: Project/paper contains a document written in LaTeX Project/sourcecode/RailsApp contains my rails app. "Project" is GITified and there have been a lot of com...

Unable to change where Git is loaded in Mac

I have MacPorts' Git at /opt/local/bin/git, while the newest Git at /opt/local/git. My PATH command export PATH=/usr/local/git:/opt/local/bin:/opt/local/sbin:/Users/Masi/.cabal/bin:/Users/Masi/.cabal/bin/xmonad:$PATH The command echo $PATH gives me /usr/local/git:/opt/local/bin:/opt/local/sbin:Users/Masi/.cabal/bin:/Users/Sam/.ca...

Unable to Git-push master to Github

This question is related to my problem in understanding rebase, branch and merge, and to the problem How can you commit to your github account as you have a teamMate in your remote list? I found out that other people have had the same problem. The problem seems to be related to /etc/xinet.d/. Problem: unable to push my local branc...

When would one need git-rebase?

Everytime I read the git-rebase documentation, I get lost. It feels to me like a kind of a low-level operation (read: dark magic). Quoting the docs: Assume the following history exists and the current branch is "topic": A---B---C topic / D---E---F---G master From this point, the result of either of the follo...

Does git support the versioning of arbitrary properties like Subversion?

I known that with subversion you can attach arbitrary properties to each files. In Subversion some properties have special meaning, they are the properties in the "svn:" namespace, but you can attach any arbitrary property to files. I wonder if git or any other distributed version control system support this feature. Any other version...

What type of git server do you use? or how do you use git?

Hi Let's say we have a small team, 1-5 persons. What type of "git setup" would you use? Would you use gitweb and apache so you could run over http? Or would you use the user-accounts and ssh in some way? Today I'm familiar to use SubVersion thou apache (http), but I'm not sure it is right to setup to use git the same way... Thanks ...

How to back up private branches in git

Hi all, I have a local branch for day-to-day dev work in git. My workflow is: Do stuff on local_branch, commit Fetch origin/master Rebase local_branch to catch up with new stuff from origin/master It all works fine, however most of the recommendations I encountered say that one should not "push" private branches, on which rebase is...

git alternatives to "svn info" that can be included in a build for traceability?

Hi I'm looking for a git alternatives to "svn info". Today I add some info that SubVersion gives me with the "svn info" command right into my build, and that is then pushed into a source file that prints this during startup. That way I always know where that build came from and how to get it back again. If you have "svn info" like UR...