The Perfect Work-flow with Git, GitHub, and SSH

Thanks! Share it with your friends!

Close

In this lesson, we’ll focus on work-flow. More specifically, we’ll use GitHub service hooks to automatically update a project on our server whenever we push …

  • Rating:
  • Views:3,309 views
  • Tags: -
  • Categories: Github

Comments

Damir Harambasic says:

Great stuff! Thank you

Richard Waery says:

awesome! Thanks Jeff

Pietro Peluso says:

Thank you Jeffrey, great tutorial!!

Jrodl3r says:

Jeff, Thx for the tut. I’m really close to getting this working on my
remote osx-ML server.. I have successful SSH connection w/ github, but I’m
still getting this on the Server.app logs: “error: cannot open
.git/FETCH_HEAD: Permission denied” (I’m not sure how to set the
permissions right for the execution of the git-pull script). Thx!

Kaleb Hornsby says:

It’s at the bottom of the right sidebar now.

Joe Fitzsimmons says:

This is incredibly helpful, thanks!

Nxqd3051990 says:

it’s really nice tutorial but I don’t think we should push github.php to
github because everyone explores it than spam is coming XD

memeLab says:

yup: stackoverflow: create-a-bitbucket-git-commit-hook

MastKalundar says:

i want textmate on windoooooooooooooooooooooooooooooooowssssss

memeLab says:

so concise! if only my shared hosting would install git (won’t happen)..
I’ve got my eye out for an scp script tutorial (until i pay for beanstalk
deployments).. Tx

Sameer Kanda says:

lets try this again: Work around: 1. follow steps from github to make new
repo and clone it to computer. 2. download AWS Command Line Tools 3. In
folder AWSDevTools, run the devtools on the same directory where ur git
project is located. 4. In my project I made a new file called git_push.sh
with this in it “/usr/bin/git aws.push [new line] /usr/bin/git push” and I
told git to ignore it (so it doesnt upload). 5. I told Netbeans to run
git_push.sh every time I run my project. Ok, im out of chars..

Eddwin Paz says:

For that my server needs to have Git installed, i wasted my time. The
tutorial is clear but does not tells that you need a Server that host Git
repositories

Steven King says:

forget textmate, try sublime text 2

Radosław Szalski says:

Amazing tutorial! I think you should make more of those workflow-tutorials.
Deployment, CI, git automation etc. Keep up the good work!

little devil says:

try sublime text 2, its awesome!!

Vivek Pradhan says:

Hey jeff! Great tutorial. I have got one question though, do we need to
generate a publich ssh key for github? What if we clone the repository
using the other link, then we can do away with the ssh key right? And I
also noticed that the you deleted the closing tag in the github.php, any
specific reason for doing that?

saad salman says:

Some how I pictured you in my mind differently.

Eswar Rajesh Pinapala says:

U rock man!! V nice video!!

Daniel Hollands says:

This is a very cool idea – I wonder if I’d be able to do something similar
with BitBucket?

Thomas Wirum Larsen says:

One issue to consider is that this sort of file is very vulnerable to DOS.
What happens if you hit that php file a few thousand times over a minute ?

Dan Daw says:

Excellent tutorial, exactly what I was looking for. Could you elaborate on
your apache setup on your server, i.e. which user it is running as? I can
pull a repo from github to my server manually when logged on, but I can’t
get it working via the URL hook. I’m thinking this is because the user
apache is running as does not have an ssh key set up. Many thanks.

Felipe Mendez says:

im having troubles with the public-private key actaully the github ui
changed so i cant find the menus :S

Uni says:

@MastKalundar – I use e-text editor, it’s not bad!

jdpfu459 says:

Is adding the file over and over before the commit really necessary? I’m
not git expert, but I was under the impression that the commit looked
through all the files that were already “added” for differences and commits
those. Also, the “git add .” is a common way to add all the files in a
directory (and perhaps recursively). Finally, it is nice to see someone who
is good at the command line doing demos. I’ve been doing UNIX for 15 yrs
and had to pause your demo to catch up! Very nice.

Write a comment

*