background preloader

Git Reference

Git Reference
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.

http://gitref.org/basic/

Related:  GitGitHubWeb Dev Tools

Understanding Git Conceptually Introduction 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 Merging Let’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 Programmers Hey…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 Management Click 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 Sheet Even 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.

Understanding the GitHub Flow · GitHub Guides GitHub Flow is a lightweight, branch-based workflow that supports teams and projects where deployments are made regularly. This guide explains how and why GitHub Flow works. Create a branch When you're working on a project, you're going to have a bunch of different features or ideas in progress at any given time – some of which are ready to go, and others which are not. Branching exists to help you manage this workflow. When you create a branch in your project, you're creating an environment where you can try out new ideas. Material Design Lite Textfields The MDL provides various CSS classes to apply various predefined visual and behavioral enhancements to the display various types of text inputs. The below table mentions the available classes and their effects. Example The following example showcases the use of mdl-textfield classes to show different types of textfields. mdl_textfields.htm <html><head><script src=" rel="stylesheet" href=" rel="stylesheet" href=" langauage="javascript"> function showMessage(value){ document.getElementById("message").innerHTML = value; } </script></head><body><table><tr><td>Simple Text Field</td><td>Numeric Text Field</td><td>Disabled Text Field</td></tr><tr><td><form action="#"><div class="mdl-textfield mdl-js-textfield"><input class="mdl-textfield__input" type="text" id="text1"><label class="mdl-textfield__label" for="text1">Text...

Scaling Puppet with Git Scaling 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 History After 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, run Getting started with Git In 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.

Spacebars Secrets: Exploring Meteor Templates The recent Meteor 0.8 update featured Blaze, a complete rewrite of Meteor’s UI system. And with Blaze came along Spacebars, a replacement for Handlebars, the templating language Meteor was previously using. Spacebars and Handlebars share the same syntax, but Spacebars brings quite a few Meteor-specific innovations. In this article, we’ll take a look at a few of these time-saving techniques, including: Creating custom helpers. Using JavaScript objects as arguments. Converting a Subversion repository to Git, (7 steps to migrate a complete mirror of svn in git) When I first realized that I needed a version control system, the best system at the time was CVS. (No, really.) Subversion was nearing 1.0, so I waited for its release and then used it everywhere. Well, that was 2003.

Git One 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.

Related: