In this tutorial, we'll take a look at ways that you can remove changes that you've made to the files in your working tree, how to remove something from the index that you've added but later decided that you're not ready to commit, and some other basic working tree and index house cleaning commands.
In this tutorial, we revisit the git commit
command and take a look at some of the additional things you can do with it, like amending a previous commit, and creating commits using shorthand methods. Then we'll look at using the interactive rebase command which will allow us to reword commit message and do other things like squash two commits into a single commit when performing a rebase.
This tutorial dives deeper into the different things you can do with the git add
command. Things like adding multiple files at a time using wildcards and staging and adding only some of the changes you've made in a file and not all of them. We'll also take a look at using a .gitignore file to exclude specific files or even patterns of files from the repository all together.
In the real world when you're working on a project with a team of people your code never stands still. It's not at all uncommon to find yourself in a scenario where git merge
or git rebase
simply can't successfully meld two branches without human interaction. For example when both branches contain a commit that modifies the same line of code in a file in different ways. This lesson will take a look at how you can go about resolving these merge conflicts and some of the tools available to help make this process easier by first creating an intentional conflict between two branches and then showing how to resolve it.
In this lesson we're going to quickly jump into the basics of a whole bunch of different git commands and get our repository created, add a couple files, and then view our log.
In this tutorial we'll take a look at creating branches with the git branch
command, and tags with the git tag
command and explain the differences. Then we'll look at how and when they can be used and how to move changes from one branch to another using the git merge
and git rebase
commands and talk about the different ways in which those two commands effect the history of a project.
This lesson covers the git diff
command and how to use the command along with a Git Treeish reference to view the differences in a project or a single file between two commits. Or between the current HEAD and the working tree. We'll also take a look at integrating Git with some external diff tools that make reading the output from the git diff
command a bit easier.
There are a lot of different ways to reference a specific commit in Git. This lesson takes a look at the various ways in which you can navigate through the history of a project by cloning the Drupal core repository from Drupal.org and looking at its contents. We'll learn about pointers to each commit, or what Git refers to as a Treeish, and how we can use those as parameters to different commands.
This tutorial takes a look at removing files from your version control system. It's generally not enough to just delete the file in the file system you also need to tell Git that it's been removed and make a commit with that information.
In this lesson we take a look at the methods available to install Git on different operating systems including Windows, Mac OS, and Linux and how to ensure that you're environment is properly setup to start using Git. Then we walk through the installation on Mac OS and finally we'll cover how to invoke Git from the command line and set some basic configuration options like telling Git who we are.
- Know where to go to download the latest verion of Git
- Be able to install Git on your operating system of choice.
- Be able to verify that Git is indeed running in your environment.
- Do some Git configuration with
`git config`, ~/.gitconfig
Additional resources
Download Git Drupal Ladder: Install Git lesson (installs Git on Windows instead of Mac)
This is an in-depth course that starts with the basics of version control, establishes some terminology, and a base line workflow, then continues to build on that by going beyond the basics of the various Git commands to make the most out of your tools.
This tutorial takes a look at the various resources that are available for getting help with Git including the built-in manual/help pages and examples as well as other documentation that we've found to be useful while learning how to use Git.
In this tutorial we'll explain some of the basic tenets of version control systems. We'll define Git terminology like repositories, branches, checkouts, and commits, and provide you with a baseline set of concepts that we can build on throughout the course.
In this Lullabot Module Monday lesson, we take a look at the Style Guide module. Comparing Drupal themes is tough: the screenshots they provide are often based on heavily tweaked sites with plenty of slider blocks, tweaked media attachments, and other just-so content. Figuring out the "basics" — how a given theme styles core HTML elements and recurring Drupal interface patterns — can be tough! Fortunately, the Style Guide module can help.
Additional resources
In this Lullabot Module Monday lesson we are introduced to the Publish Button module. It's a simple problem, but a serious one. You've put your content editors in front of Drupal for the first time, and they can understand the node form without any problems. They understand taxonomy terms, grok menus and node references… but they get nervous when it's time to save their work. "Will... will this be published as soon as I click 'save?'" Normally, there's no good way to make the distinction between saving and publishing a piece of content explicit. Site builders can set a content type to be unpublished by default, then give editors the broad "administer nodes" permission, but that's clumsy solution that forces editors to dig for what should be a simple action: publishing or unpublishing a post. That's where the Publish Button module comes in.
Additional resources
In this Lullabot Module Monday article, we learn about the Mass Password Reset module. It's a question we all ask ourselves: What would I do if my site or server was compromised? Security professionals have loads of checklists to follow, and experienced server administrators drill for those moments. As we saw when Twitter.com was compromised by hackers, "Reset everyone's passwords, right away!" is almost always one of the important steps. If you run a Drupal site, that particular step can be frustrating. Resetting user passwords one by one is incredibly time consuming, and there's no way to do it for everyone in one fell swoop. At least, there wasn't until the release of the Mass Password Reset module.
Additional resources
In this Lullabot Module Monday lesson we take a look at the Backup and Migrate module. Few things are more terrifying than the realization that a server hiccup has wiped out a web site, or a hasty change deployed to the live site has nuked important content. Fortunately, there's a module that can help. Backup and Migrate offers site builders a host of options for manually and automatically backing up their sites' databases, and integrates with third-party backup services, to boot!
Additional resources
In this Lullabot Module Monday lesson we look at the Word Link module. It's a simple problem, but a tricky one: How can you ensure that special words and phrases, like your company's name or certain trademarks, are always linked to an appropriate web site when they're used in the text of an article? The easy answer is Word Link module: it lets you set up a custom glossary of terms that should be turned into links whenever the appear in text.
Additional resources
In this Lullabot Module Monday lesson we walk through the useful Menu Position module. It's a word that can strike fear into the heart of the bravest site builder: Breadcrumbs. Manage them well, and you'll give visitors a helpful visual indicator of where they're at in your site. Miss a detail, and the weird inconsistencies will be more confusing than no breadcrumbs at all. The challenges stem from Drupal's "flat hierarchy" -- by default, almost all pages (including every node you create) live just beneath the home page itself in an undifferentiated pool of content. All of the visual cues it sends to visitors (breadcrumb trails, highlighted parent items in the navigation menus, and so on) start with that assumption until you override them. That's where the Menu Position module helps out. It lets you set up simple rules that tell Drupal where each node type should go in the site's hierarchy, then handles all of the frustrating details automatically.
Additional resources
The Entity Views Attachment (EVA) module extends the Views module to allow you to attach a view to any entities on your site. Views on its own will let you create a page for your view, with its own URL, and it also lets you attach multiple views to the same Views page, but it doesn't let you do something like attach a view to a node, or a user. This lesson walks through a simple example of creating a basic view listing published articles on a site, and then using EVA to attach that view to user profiles, and making sure that we only list the published articles for that user, using a contextual filter.