background preloader

Workflows | Git/Version Control/Etc

Facebook Twitter

A Rebase Workflow for Git. Update: Just for clarification, I'm not opposed to merges.

A Rebase Workflow for Git

I'm only opposed to unintentional merges (especially with a git pull). This followup article describes a simple way to rebase most of the time without even thinking about it). Also, for local development I love the git merge --squash method described by joachim below. In this post I'm going to try to get you to adopt a specific rebase-based workflow, and to avoid (mostly) the merge workflow. What is the Merge Workflow? The merge workflow consists of: git commit -m "something"git pull # this does a merge from origin and may add a merge commitgit push # Push back both my commit and the (possible) merge commit Note that you normally are forced to do the pull unless you're the only committer and you committed the last commit. Why Don't I Want the Merge Workflow? These are the problems with the merge workflow: It has the potential for disaster, as that merge and merge commit have to be handled correctly by every committer.

And. How to push your code to your remote web server with Git - Bob Belderbos. Today a quick post on how to use Git to push your code to a remote location.

How to push your code to your remote web server with Git - Bob Belderbos

I found this very useful when developing sites. Welcome to post #100. I learned this from Using Git to manage a web site and after using this technique at 2 websites, I found this needed to have a dedicated post. The article explains it very well, but this note taking helps me to remember and implement it well. And you guys might find this quite useful :) Note that it is highly recommended to set up a key-based login to your remote server, see this useful SSH reference for more details. A Git workflow for single developers. So far I used Subversion as version control system and my usual workflow is quite simple: IDE => Subversion repository => live web application I develop on my local machine, commit the code to the Subversion repository on the server, and finally export the code from the repository to the live application.

A Git workflow for single developers

That works fine. GIT Development Workflow - FirebugWiki. From FirebugWiki [edit] Recommended settings Recommended settings in your .gitconfig file: Entire Firebug repository should use Unix line endings.

GIT Development Workflow - FirebugWiki

Windows: git config --global core.autocrlf true git config --global core.safecrlf false Linux: git config --global core.autocrlf input git config --global core.safecrlf false It's also useful to have the following aliases defined in your .gitconfig [alias] co = checkout ci = commit st = status br = branch hist = log --pretty=format:\"%h %ad | %s%d [%an]\" --graph --date=short [edit] General workflow Anything in the master branch is deployable To implement a new feature or bug fix create a new feature branch out of master Commit all your changes to the branch and push on the server When you need feedback/review/help, open a pull request After testing your branch by running Firebug test suite on it, merge it into master When doing a release create a tag/branch off of master [edit] master branch The master branch should be stable. [edit] 1. [edit] 2. The Perfect Workflow, with Git, GitHub, and SSH. In this lesson, we'll focus on workflow.

More specifically, we'll use the helpful GitHub service hooks to automatically update a project on our personal server whenever we push updates to a GitHub repo. Prefer a Video Tutorial? Press the HD for a clearer picture. Subscribe to our YouTube and Blip.tv channels to watch more screencasts. Step 1 - Create a Git Repo We certainly need some sort of project to play around with, right? With our test directory in place, let's create our first Git commit. If you're unfamiliar with Git, I highly recommend that you first review "Easy Version Control with Git. " Open the command line: Those familiar with Git should feel right at home. Step 2 - Uploading to GitHub The next step is to upload our project to GitHub. Again, if you're not familiar with GitHub, and haven't yet created an account, read Terminal, Git, and GitHub for the Rest of Us.

Begin by creating a new Git repository. Next, you'll need to fill in some details about your project. Step 3 - SSH. Minimal design » articles » Git workflow for web development. First off, I should point out that this is not a Git tutorial.

minimal design » articles » Git workflow for web development

If that’s what you’re looking for, I can’t recommend enough the PeepCode Git Screencast. You’ll be up and running in a couple of hours. This article is more of bullet point type step-by-step on how to integrate Git within your web development workflow. The basic idea is to have a bare repository hosted remotely that serves as a “hub” you clone from. First you start working locally; when you got some work done, you create the bare repo on the remote server and push all your local work there; when you’re ready to let your client review it, you clone the bare repo one more time to a protected directory only your client has access to. I have a life account with joyent from back in the days when it was TextDrive, so that’s where I host my Git stuff. Local Create the local repository: cd ~/Sites/client-name/site-name git init $ git add . git commit -m "initial import"