…want to delete any reference that may exist there if we don't have such reference in our refs/remotes/origin/* (and tags) references.
Conclusion
Git is certainly not an easy tool to learn. Although when you do, it turns into a very powerful and flexible tool.
If you want to learn more about it, please see the excelent book written by Scott Chacon and available for free .
What about you? Have any tips on git you want to share?
Since its release I've been a fan of Git. (I still can remember downloading the initial version.) The thing I like most is that it can be extended and customized in an unixy way. Over time, I have collected some scripts and tricks that I would like to present to a wider audience. Git information online abounds (I especially recommend Mark J. Dominus in-depth posts on Git ), thus I will only show stuff I haven't seen elsewhere.
git news
Let's start with a simple …
Using Git
Using RVM (for *nix)
Using pik (for Windows)
Using bundler
Creating a simple webpage using HTML5, CSS and JavaScript
Store your webpage files on GitHub
Understanding HTTP concepts
Using cURL
net/http library
Using open-uri
Learning Rack
Deploying Pure Rack Apps to Heroku
Deploying a static webpage to Heroku
What's JSON?
…
…framework for hackers. You should be comfortable running shell commands and familiar with the basics of Git. If that sounds daunting, Octopress probably isn't for you.
Now that I had decided on using Octopress, I next needed to figure out where to host it. One of the services I have been hearing a lot about that I have been wanting to play with is Engine Yard, so I thought it would be a good opportunity to try them out as a potential home for my blog. In checking the Octopress documentation, …
Finding this brought to light one of the difficulties, which is that Git diff s won't necessarily show when you exceed 100 lines.
Five lines per method
Limiting methods to five lines per method is the most interesting rule.
We agreed on a fairly strict definition of a line: if , else , and end are all lines. So in an if block with two branches, each branch can only be one line. For example: def validate_actor if actor_type == 'Group' user_must_belong_to_grou …
To solve this problem, I'll be harnessing the power of Git. In a nutshell, we'll have two branches: master and framework . The master branch will be our application. The framework branch will be the Laravel framework that is powering our app. ( Laravel's repository can be found here ) When an update is made to Laravel, we check out the framework branch, pull in the most recent version of the framework, then merge those changes with master . Pretty straightforward. …
To install mcpipy, you can either use Git (if you have it installed), or you can download and uncompress the zip file . I put it in ~/Local/mcpipy. To test that it's working, try: cd ~/Local/mcpipy
python zhuowei_rainbow.py This will draw a rainbow in your running copy of Minecraft. After running the command, assuming there were no errors, it takes a little while for the rainbow to show up.
To try out my code, create a file called ~/Local/mcpipy/jjinux_sierpinski_triangle.py …
…Git, or in .gitignore d files, and as mentioned, it only works in directories managed by Git. You can trade in some speed for removing these gotchas with the flags --untracked , --no-exclude-standard and --no-index .
I use project-wide search all the time. It's not just for search-and-replace, of course.
The quickfix window
The search results end up in the quickfix window , a split window in Vim that you can move through like any Vim buffer. Hitting ⏎ …
These days a lot of people have switched from Subversion to Git. When you've worked with Git for a while, Subversion probably feels archaic and unproductive. The "killer app" for Git is Github , which provides an unbeatable collaboration experience. Indeed, many projects that have switched to Github reported a dramatic increase in contributions!
In order to stimulate Nginx development, we've launched a Github mirror of the Nginx SVN repository: …
Git is your friend and you should use it to find data about things from years long gone
Any complicated application, kernel, or whatever will have a large number of ugly scars and warts that cannot be changed to maintain backward compatibility. Such is life.
If you enjoyed this article, subscribe (via RSS or e-mail) and follow me on twitter.
References
http://web.archiveorange.com/archive/v/iv9U0zrDmBRAagTHyhHz
The sha for this change is: 0de28d5c71a3b58857642b3d5d804a790d9f6981 …