background preloader

Git

Facebook Twitter

How to auto deploy Rails apps after Git push ··· Nico Hagenburger. For my most recent project, I had to share a git repository with another Rails developer. He also had to make deploys on my server. As my server has many projects, I though about having another way than giving him access via SSH for cap deploy. I remembered Heroku automatically deploys Rails apps after commits. So here’s how you can have the same functionality with pure Git. Configuration of SSH And Users I’m assuming the following configuration: Git repository /home/git/awesome-rails-app.git Deploy path /var/www/awesome-rails-app Git user git Deploy user deploy Authentication with SSH keys First, create a SSH key for the user git (unless you already did so) and add it for for the deploy user and vice versa: # log in as git: ssh-keygen -t rsa # log in as deploy: cat /home/git/.ssh/id_rsa.pub >> /home/deploy/authorized_keys ssh-keygen -t rsa # log in as git: cat /home/deploy/.ssh/id_rsa.pub >> /home/git/authorized_keys Installing the Git Hook Git offers some hooks, where you can add your own code.

Github is my resume. I remember the first time I heard that statement - a couple years back Eric Florenzano said it to me on Twitter when I posted my resume publicly and asked for opinions. At the time I laughed at his statement, because it felt like naive arrogance to ditch the idea of a resume and 'traditional' social networking like Facebook and LinkedIn. How wrong I was... Before I go any further, this isn't to say that education, job history, and references aren't important in getting jobs that utilize a lot of Python. They are important, but I think they go more towards shaping you as a person than getting a job. So if you want access to Python jobs (and possibly other open source languages), you need to be able to show working code.

Why is this the case? Python employers want to review your code in a public repo. That puts the pressure on you doesn't it? Python employers are smart enough to read your commit log. So as a beginner, what can you do? One good trick is to put your ongoing notes in a repo. Recruitment at master from mattb/flotsam - GitHub. GitHub Pages. Git Submodules: Adding, Using, Removing, Updating :: Chris Jean. I’ve spent a little more than a month working with Git now.

I can honestly say that while there are many things that I like about Git, there are just as many things that I personally find to be a pain in the butt. Submodules specifically have managed to be a thorn in my side on many occasions. While the concept of submodules is simple, figuring out how to actually work with them can be a chore. I say “figuring out” because not everything about working with submodules is well documented. I’ll cover two of the more difficult things to figure out: removing and updating submodules from your repository. What are Submodules? The concept of submodules is brilliant. My profession is working with WordPress themes. Each theme that we produce is kept in its own Git repository. For example, we have a theme called FlexxBold.

As I mentioned before, not everything in Git is easy to work with. Adding Submodules to a Git Repository There are three main parts to this command: Using Submodules Closing Thoughts. Git Reference.