git-fat – simple way to handle fat files without committing them to git, supports synchronization using rsync
Tag: version control
VersionPress: True Version Control Comes to WordPress
Git branch names support forward slashes
Oh. My. God! Â I’ve been using git for years now and I only learned this today – git branch names support forward slashes! How awesome is that?! Â You can do things like this:
$ git checkout -b feature/foobar
Grouping branches like this is much easier indeed!
I came across this while reading CakeDC’s CakePHP Plugin Standard. Â Searching around to find more details, I see that there are a few potential issues with this naming convention, as tools occasionally break (composer, IDEs, etc). Â However, these problems are fixed by tool vendors. Â Looking into it even further, I found the following description in the book “Version Control with Git: Powerful tools and techniques for collaborative software development” (Google Books preview):
Dos and Don’ts in Branch Names
Branch names must conform to a few simple rules.
- You can use the forward slash (/) to create a hierarchical name scheme. Â However, the name cannot end with a slash.
- The name cannot start with a minus sign (-).
- No slash-separated component can begin with a dot (.). Â A branch name such as feature/.new is invalid.
- The name cannot contain two consecutive dots (..) anywhere.
- Further, the name cannot contain:
- Any space or other whitespace character
- A character that has special meaning to Git, including the tilde (~), caret (^), colon (:), question mark (?), asterisk (*), and open bracket ([).
- An ASCII control character, which is any byte with a value lower than \040 octal, or the DEL character (\177 octal)
These branch name rules are enforced by the git check-ref-format plumbing command, and they are designed to ensure that each branch name is both easily typed and usable as a filename within the .git directory and scripts.
So, as you can see, you aren’t even limited to the single forward slash. Even things like this work just fine:
$ git checkout -b Leonid/ideas/feature/foobar
But remember, just because you CAN do something, doesn’t necessarily mean you SHOULD. Â Have a look at this StackOverflow discussion about git branch naming best practices for more understanding on what you should and shouldn’t do.
GitHub introduces the Revert button
Git is an amazing version control tool. Â But like anything else, it has it’s clunky sides. Â One of them is the undo of some operations, such as merges. Â It is possible, but it’s not trivial. Â And that’s the reason for projects like gitjk to exist.
GitHub however has been known for smoothing down the edges of git, making it easier and more fun to use. Â Today, they’ve introduced yet another change that is very welcome – a Revert button.
When pressed, it will help you to create a Pull Request that reverts the changes in question. Â Brilliant, just brilliant!
gitjk – undo what you just did in git
gitjk – undo what you just did in git.
Supports the following git commands: add, archive, branch, cat-file, checkout, clone, commit, diff, fetch, grep, init, log, ls-tree, merge, mv, pull, push, remote, revert, rm, show, stash,status.
Support for the following git commands is not implemented: bisect, fsck, gc, prune, rebase, reset, tag.