background preloader

Basic Branching and Merging

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: Switch to your production branch.Create a branch to add the hotfix.After it’s tested, merge the hotfix branch, and push to production.Switch back to your original story and continue working. Basic Branching First, let’s say you’re working on your project and have a couple of commits already. You’ve decided that you’re going to work on issue #53 in whatever issue-tracking system your company uses. $ git checkout -b iss53 Switched to a new branch "iss53" This is shorthand for: $ git branch iss53 $ git checkout iss53 You work on your web site and do some commits. $ vim index.html $ git commit -a -m 'added a new footer [issue 53]' Basic Merging Note

Understanding Design Patterns in JavaScript Today, we're going to put on our computer science hats as we learn about some common design patterns. Design patterns offer developers ways to solve technical problems in a reusable and elegant way. Interested in becoming a better JavaScript developer? Then read on. Republished Tutorial Every few weeks, we revisit some of our reader's favorite posts from throughout the history of the site. Solid design patterns are the basic building block for maintainable software applications. A design pattern is a reusable software solution Simply put, a design pattern is a reusable software solution to a specific type of problem that occurs frequently when developing software. patterns are proven solutions to software development problems patterns are scalable as they usually are structured and have rules that you should follow patterns are reusable for similar problems We'll get into some examples of design patterns further in to the tutorial. Take a look at the three examples above.

git - Pull new updates from original Github repository into forked Github repository stashing your changes committed 10 Jan 2009 Stashing is a great way to pause what you’re currently working on and come back to it later. For example, if you working on that awesome, brand new feature but someone just found a bug that you need to fix. git add . Or add individual files to the index, your pick. git stash And boom! git stash apply You can also do multiple layers of stashes, so make sure to use git stash list To check out all of your current ones. git stash apply stash@{1} You can also easily apply the top stash on the stack by using (Thanks jamesgolick!) git stash pop A note with this command, it deletes that stash for good, while apply does not. git stash drop <id> Or delete all of the stored stashes with: git stash clear

OK Computer Solutions How gzip compression works - Make the Web Faster Authors: Kevin Khaw & Eric Higgins, Google Webmasters Recommended experience: Working knowledge of HTTP and HTML High level overview of a browser request with and without gzip compression Server without gzip: Browser: Connects to server and requests page.Server that browser supports gzip "Accept-Encoding: gzip".Server:No gzip support. Server with gzip: Connects to server.Notifies server that browser supports gzip "Accept-Encoding: gzip".Server:Acknowledges gzip support.Sends gzip encoded page with header "Content-Encoding: gzip".Browser:Receive page.Decode gzip encoded page based on header "Content-Encoding: gzip".Display page. How gzip compresses Simply put, gzip compression works by finding similar strings within a text file, and replacing those strings temporarily to make the overall file size smaller. Example In this example, I'll demonstrate how using identical tags will compress a snippet of code further than using different tags. Uncompressed: 69 bytes Compressed: 85 bytes

Git User’s Manual (for version 1.5.3 or newer) This chapter covers internal details of the git implementation which probably only git developers need to understand. It is not always easy for new developers to find their way through Git’s source code. This section gives you a little guidance to show where to start. A good place to start is with the contents of the initial commit, with: $ git checkout e83c5163 The initial revision lays the foundation for almost everything git has today, but is small enough to read in one sitting. Note that terminology has changed since that revision. Also, we do not call it "cache" any more, but rather "index"; however, the file is still called cache.h. If you grasp the ideas in that initial commit, you should check out a more recent version and skim cache.h, object.h and commit.h. In the early days, Git (in the tradition of UNIX) was a bunch of programs which were extremely simple, and which you used in scripts, piping the output of one into another. Next step: get familiar with the object naming. Voila.

MonoDevelop - MonoDevelop Grunt: The JavaScript Task Runner StGIT Wiki: StGIT Tutorial Introduction StGIT is a Python application that provides functionality similar to quilt (i.e. pushing/popping patches to/from a stack) using GIT instead of 'diff' and 'patch'. StGIT stores its patches in a GIT repository as normal GIT commit objects. StGIT is not an SCM interface on top of GIT. StGIT is available for download at . This tutorial assumes you are already familiar with GIT. Basic Operation Help For a full list of StGIT commands: stg --help For help on individual subcommands: stg <cmd> (-h | --help) Repository initialisation In stand-alone mode, StGIT is used in conjunction with a GIT repository that is already initialised (using 'git-init-db'). Any branch in a GIT repository may be managed by StGIT. To initialise an existing GIT branch to be managed by StGIT, cd into the top of your GIT repository, check out the branch you'd like to manage with StGIT, and type: stg init You can switch between GIT branches with: stg branch [<branch name>] stg clean stg status

The Hitchhiker’s Guide to Python! — The Hitchhiker Greetings, Earthling! Welcome to The Hitchhiker’s Guide to Python. This is a living, breathing guide. If you’d like to contribute, fork us on GitHub! This handcrafted guide exists to provide both novice and expert Python developers a best practice handbook to the installation, configuration, and usage of Python on a daily basis. This guide is opinionated in a way that is almost, but not quite, entirely unlike Python’s official documentation. Let’s get started! Getting Started with Python New to Python? Properly Install Python Writing Great Python Code This part of the guide focuses on the best-practices for writing Python code. Scenario Guide for Python Applications This part of the guide focuses on tool and module advice based on different scenarios. Shipping Great Python Code This part of the guide focuses on deploying your Python code. Python Development Environments Additional Notes Note Contribution notes and legal information (for those interested).

The Thing About Git The thing about Git is that it's oddly liberal with how and when you use it. Version control systems have traditionally required a lot of up-front planning followed by constant interaction to get changes to the right place at the right time and in the right order. And woe unto thee if a rule is broken somewhere along the way, or you change your mind about something, or you just want to fix this one thing real quick before having to commit all the other crap in your working copy. Git is quite different in this regard. Remember a long time ago, at the dinner table, when your kid brother mashed together a bunch of food that really should not have been mashed together -- chicken, jello, gravy, condiments, corn, milk, peas, pudding, all that stuff -- and proceeded to eat it? I've personally settled into a development style where coding and interacting with version control are distinctly separate activities. The Tangled Working Copy Problem Git means never having to say, "you should have"

Related: