Newbie to GIT – deploying from Github to Google Compute Engine / AWS

I am new to GIT and am still learning the basics. I have however been able to successfully create a repository at using the GUI tool and have 4 branches for my project

1. Master - default
2. Local - which is the copy of code that runs on my local machine
3. GCE - DEV - which is the copy I'd like to deploy onto my google compute engine instance

  • npm WARN package.json Stock@0.0.1 No repository field
  • Deployment of website on Amazon AWS
  • What makes Git better than Subversion for merging?
  • Problems cloning 1and1 git repository in 1and1 shared Linux server with Eclipse EGit
  • Can “git pull” automatically stash and pop pending changes?
  • How to use 2 GIT Repos in a Project? (git submodules, subtree)
  • Question 1 – what is the simplest way to move code from one branch to another? In other words once I test and certify code in my local branch I’d like to move it to the GCE DEV branch from where I can deploy to my server. How do I move an entire branch vs just a few files?

    Question 2 – currently I SSH into my google compute instance and then use git clone to copy over code to my folder there. Is there a better way?

    Question 3 – My folder on google compute is not added to GIT – should I add it to GIT? Or should I leave it alone and just continue to clone code into like mentioned in step #2

    Question 4 – subjective – but is this a good way to organize my code? The reason I did it this way is to ensure that I have code versions in every environment and I can track the movement of code across environments via branches in GIT

    Again – I am new to GIT so I apologize in advance if I am making fundamental errors or assumptions but help is appreciated.

  • Manage http access to git repositories using gitosis
  • Why github allows unrecognized author to commit
  • git - Completely remove commits from an unrelated remote that was added accidentally
  • Does git reuse blobs?
  • GIT: How to get rid of the annoying CRLF message on msysgit (windows)?
  • Git-svn - import full history
  • One Solution collect form web for “Newbie to GIT – deploying from Github to Google Compute Engine / AWS”

    1. The way to move code from one branch to another is to merge. See Pro Git, the chapter on Basic Branching and Merging for starters.

    2. Yes, you only need to create a clone once. After you have created a clone, you can use git pull to update the files on your server.

    3. It’s unclear what you mean by “added to Git”.

    4. Branches are for tracking different paths of development, rather than for separating code between physical (different machine) boundaries. See A successful Git branching model for a description of “git flow”, which is a good way to think about branches.

    Git Baby is a git and github fan, let's start git clone.