git

Git squash all commits into a single commit

How do you squash your entire repository down to the first commit? I can rebase to the first commit, but that would leave me with 2 commits. Is there a way to reference the commit before the first one? ...

Anjuta and Git tutorial for a noob?

Greetings! Is there a noob-suitable tutorial on Committing a project created with Anjuta into a Git repository? I could do the initial commit from command line, but I'm really trying to figure out how to do it from within the ide. I have the git plugin enabled, but for the life of me can't figure how to move from there. The project for n...

Git: howto manually merge file from working tree with a file from HEAD

I don't know if what i'm trying to do makes sense but here is the explanation: I have some source files that are generated by a tool and then changed a little and committed. What happens is that sometimes I need to regenerate these files. I need to do a manual merge of this new file with the one that was previously committed and pick ...

GIT, GITOSIS, WEBSITE - Paths

I have an Ubuntu server and have installed git and gitosis. I am new to server administration and have the following gitosis folder tree: /home/git/repositories I have edited the user's rights to different repositories by cloning gitosis-admin.git to my local machine, edited gitosis.conf and added user's public keys to the keydir and pu...

How to make a git repository read-only?

I have some git repositories accessed remotely through SSH and I want to make some of them read-only to prevent more pushes. Some people have remotes pointing to these repositories. These bare repositories were initialised --shared=group, so is setting file permissions to 660 for all files good enough to still allow SSH access, but disa...

Export subtree in Git with history

I have a folder in my Git repository that I'd like to move out in to its own repository. Is it possible to move the history of that folder along with the folder? I've previously been doing just a git rm -r --cached subfolder/ and then git init on the subfolder. However, the history is not imported in to the new repository. ...

How do I merge a single commit?

Sometimes I'm working with several branches at once. Say I have branches called master, release-1.1, and experimental. I create a new file or make a change in experimental and I want that one single change to apply to the other branches. Can I do this in git? If I simply merge the commit into another branch, git automatically "fast-f...

cannot sync from android repository

I'm trying to make sync according http://source.android.com/download manual, so everything is good, except syncing :) repo sync ... Fetching projects: 5% (8/143) Initializing project platform/development ... fatal: The remote end hung up unexpectedly error: Cannot fetch platform/development .. or Fetching projects: 2% (3/143) fat...

Version control; choices, choices, choices!

Our setup as follows: We have a local development server running Ubuntu, with a setup to mirror that of our live host. Each developer works on a Windows machine and accesses the files from the local dev server. The projects in question are a number of websites built in PHP. Seeing as there are no good reasons not to use version control...

How can i pull a specific folder from origin (Remote repository) into my local master repository

Hi guys, unfortunately i deleted a src folder from my local master branch. Now i would like to pull or clone JUST the src file again from the origin. Is it possible to do that? When yes, how can i solve this issue... Any suggestion is welcome... Thanks in advance ...

Questions on workflow for a team using a git-svn repo

I've bee reading up on git and git-svn. I'm pretty new to git but I've been able to create some basic repos. However, I'm a bit confused on how the workflow would go for git-svn being used by a team. The goal is to convert svn to git for branching and sharing purposes, then commit back to the main svn repo when ready to push to productio...

Git (TortoiseGit) - How to change the HEAD to a previous revision

Hi, When using Git with TortoiseGit: Does somebody know how to change the HEAD to a previous revision for a complete repository and/or just a single file? For example i have a repository containing multiple files. One file exists in three revisions (1 ; 2 ; 3). Now i want to change from revision 3 back to 2. TortoiseGit offers a "Reve...

Indenting Bash Script Output

Hello all, I am attempting to write a bash script and I am having difficulty making the output look neat and organized. I could fall back on just using newlines, but I would much rather have output that was easy to read. For instance, when I run git clone ..., I want to first echo "Cloning repository" and then have the output of git ind...

How to cherry-pick multiple commits

I have two branches. Commit a is the head of one, while the other has b, c, d, e and f on top of a. I want to move c, d, e and f to first branch without commit b. Using cherry pick it is easy: checkout first branch cherry-pick one by one c to f and rebase second branch onto first. But is there any way to cherry-pick all c-f in one comman...

How can I combine these git commands?

I do the following string of commands for git and my fingers are getting tired of typing them. :) git add . git commit -m 'Some message' git push cap deploy How can I combine those (including adding a message) into a single command, like "git booyah" or something? ...

Git merge from a specific folder only.

OK, here's my problem, let me try to make it all make sense... I've created a rails website for client X. I now have a client, Y, who wants a website that does the exact same thing as client X, but with a different skin. Rails was perfect for this since all the skinning was in it's own folder and set apart from all the business logic. ...

How do I get my git merge conflicts back after merging incorrectly?

I'm trying to merge 2 branches that have a lot of changes in them, several with merge conflicts. I merged the files using git mergetool, but I've subsequently realized that I merged a couple of them incorrectly. I basically want to go back to the conflicted state for those couple files, so I can re-run the mergetool and correct my erro...

Files to ignore when using Visual Studio with Git

I've installed Git to do some development using Visual Studio 2008. Most of the work will be new development but we do have some old projects from prior to VS2005 that I want to bring over into the new repository. There is an existing thread about general VS/Git integration but my question is limited to the .gitignore file and Visual St...

Is there an ignore command for git like there is for svn?

I am a new user to git and I am starting a new project. I have a bunch of dot files that I would like to ignore. Is there an ignore command for git like there is for svn? ...

How to push with TortoiseGit

In push following errors occured git.exe push "origin" master:master To prevent you from losing history, non-fast-forward updates were rejected Merge the remote changes before pushing again. See the 'non-fast forward' section of 'git push --help' for details. To //oht-fsv1/Source/Git/Test ! [rejected] master -> master (non-f...