git reset is probably the most confusing command written by humans, but it can be very useful once you get the hang of it. There are three specific invocations of it that are generally helpful. git reset HEAD unstage files from index and reset pointer to HEAD First, you can use it to unstage something that has been accidentally staged. Let's say that you have modified two files and want to record them into two different commits. You should stage and commit one, then stage and commit the other. Let's see what it looks like to unstage something. $ git status -s M README M hello.rb $ git add .$ git status -sM README M hello.rb $ git reset HEAD -- hello.rb Unstaged changes after reset: M hello.rb $ git status -sM README M hello.rb Now you can run a git commit which will just record the changes to the README file, not the now unstaged hello.rb. If you want to be able to just run git unstage, you can easily setup an alias in Git. The third option is to go --hard.
Understanding Git ConceptuallyIntroduction This is a tutorial on the Git version control system. Git is quickly becoming one of the most popular version control systems in use. There are plenty of tutorials on Git already. How is this one different?Basic Branching and MergingLet’s go through a simple example of branching and merging with a workflow that you might use in the real world. You’ll follow these steps: Do work on a web site.Create a branch for a new story you’re working on.Do some work in that branch. At this stage, you’ll receive a call that another issue is critical and you need a hotfix. You’ll do the following:
The Best Firefox Add-ons for Developers: 30+ Tools for ProgrammersHey…remember Firefox? Google Chrome is now king of the browser hill, but Firefox is still chugging along and is actually still the best browser for web app developers to use. Sure it’s a little slow and hard on memory, but its customization options can’t be beaten. We’ve listed a few of our favorite Firefox add-ons that make our lives as developers a little easier, and hopefully, they’ll save you a bit of time and frustration, as well. From tools designed to meet web developers’ needs to debugging add-ons, tab management tools, password management tools, and more, we’ve rounded up 35 time-saving tools to make your web development work more seamless. While this post was originally published in a previous year, we’ve recently updated it to eliminate add-ons that are no longer available, include the most recently available information on features and functionality, and replace tools with ratings of 3/5 stars or lower with higher-rated add-ons.
Parallel Development Strategies for Software Configuration ManagementClick here to view the complete list of archived articles This article was originally published in the Summer 2004 issue of Methods & Tools Parallel Development Strategies for Software Configuration Management Tom Bret, Confluence Systems Ltd, in association with MKS Inc (www.mks.com) Abstract Software project managers routinely face the challenge of developing parallel configurations of software assets.Git Cheat SheetEven with a GUI application at hand there are times when you resort to the command line. We admit we can’t memorize all important Git commands – that’s why we created a nice cheat sheet for Git that we would like to share with you. On the front you can find all important commands.
Scaling Puppet with GitScaling Puppet with Git More and more people are turning to systems automation tools like Puppet and Chef to get the most out of their environments, and to create time to focus on delivering business benefits. Scaling Puppet is most commonly done using client/server mode, in which every client is issued with an SSL certificate, and conversations take place between clients and a server, over HTTP, and manifests and assets are served over the network, and applied by a locally running Puppet daemon.
Viewing the Commit HistoryAfter you have created several commits, or if you have cloned a repository with an existing commit history, you’ll probably want to look back to see what has happened. The most basic and powerful tool to do this is the git log command. These examples use a very simple project called “simplegit”. To get the project, runGetting started with GitIn the introduction to this series we learned who should use Git, and what it is for. Today we will learn how to clone public Git repositories, and how to extract individual files without cloning the whole works. Since Git is so popular, it makes life a lot easier if you're at least familiar with it at a basic level.
GitOne of the topics that I didn't cover in depth in the Pro Git book is the reset command. Most of the reason for this, honestly, is that I never strongly understood the command beyond the handful of specific use cases that I needed it for. I knew what the command did, but not really how it was designed to work. Since then I have become more comfortable with the command, largely thanks to Mark Dominus's article re-phrasing the content of the man-page, which I always found very difficult to follow.