background preloader

GIT

Facebook Twitter

Learn.GitHub - Undoing. Revert, reset, checkout, or unstage a file or project state at any point. There are a number of situations in Git where you may want to undo or revert a change that you made. Perhaps you staged a file and then decided that you didn’t want it staged, or you edited a file and then wanted to ‘un-edit’ it. This section will explore a couple of ways you can undo or revert actions in Git. unstaging files Here we’ve staged changes to both our REAME and simplegit.rb files, but then we decide that we want the changes to be two separate commits. . $ git status # On branch nolimit # Changes to be committed: # (use "git reset HEAD <file>... " to unstage) # # modified: README # modified: lib/simplegit.rb # If you ever forget how to unstage a file, just run the ‘git status’ command to remind yourself with the (use “git reset HEAD (file)…” to unstage) text.

. $ git reset HEAD README README: locally modified Now if we run the ‘status’ command again, we can see that the README file is no longer staged. An introduction to git-svn for Subversion/SVK users and deserters. This article is aimed at people who want to contribute to projects which are using Subversion as their code-wiki . It is particularly targeted at SVK users, who are already used to a work-flow that involves disconnected operation, though this is a tiny subset of the workflows supported by the git suite. Subversion users can skip SVK and move straight onto git-svn with this tutorial. People who are responsible for Subversion servers and are converting them to git in order to lay them down to die are advised to consider the one-off git-svnimport , which is useful for bespoke conversions where you don't necessarily want to leave SVN/CVS/etc breadcrumbs behind.

I'll mention bespoke conversions at the end of the tutorial, and the sort of thing that you end up doing with them. This is quite different from the Git - SVN Crash Course on the Git home page, which is intended for people who are familiar with Subversion who want to work with Git mastered projects using Git. Sam Vilain Contents: What!? How to configure remote shared access to a git repository on Ubuntu using SSH keys. Requirements: I have a need to share a git repository on a publicly facing server with our development team who are geographically disparate. The team should not have full root SSH access to the server, and the repository should be private (not publicly accessible). We would like to use SSH keys for authentication so that the developer does not have to type in their password each time they issue a git command that interacts with the server.

These instructions assume Ubuntu Linux 10.04 and Mac OS X client. The instructions are pretty identical if your local workstation is some flavour of Linux. If you want instructions on how to generate a SSH key on Windows, follow these instructions from github.com, which are listed at the bottom of this post. Begin on the server in question that we’ll call repository.yourtestserver.com: #create a group for a repository create group in webmin (gittestuser) #create a user for the repository and add it to the group. Then issue these commands cd ~/.ssh.

SERVER-side

Normal.