Push code with Git

I ended at Windows using the recommended app by Bitbucket SourceTree.

For what I’ve tested it, works fine and gets the work done. Once I get home I’ll try to use the shell with the Mac, I’ve tried with windows but I couldn’t, the instructions provided weren’t accurate.

Later I found this guide but I am not going to try it at Windows since is the work’s computer.

Any recommendation?

9 thoughts on “Push code with Git

  1. I got it! with the shell command is less visual but I like it, finally I am starting to put some use into the time we got at the beginning with the shell course 😛
    Quick resume:
    Installed git with brew “brew install git” (I love how easy is to work with brew!)
    With the ‘sitepoint’ guide you previously posted, I set up my id and email.
    From here I followed the cool guide from Roger Dudler you posted.
    I went to the directory were I am going to store all my projects ‘~/Sites/’
    ‘git init’
    ‘git clone username@host:/path/to/repository’
    And it is working! 🙂

    Like

  2. Now I am doing minors updates from one computer and the other, to check how behaves Git, but I am not getting what I was expecting.
    Do you have to ckeck with ‘git remote update’ if your local files are up to date? then use ‘git pull’ to update? 😦
    Sure there is an automatic way of doing it. I have not searched for it, don’t do it, leave it to me ;).
    My question is: Do you suggest some sort of automatic update?
    Thanks 🙂

    Like

  3. Typo: “resume” means “retomar algo”. You should better use “summary” in that context. Also, check the preview before sending a “formatted” message, bitbucket screws markdown badly.
    No automatic updates, you should be pulling for changes manually as there are times when you might have conflicts to resolve.
    I normally do:
    git stash (to save my current un-commited work)
    git pull –rebase (to pull changes, rewind the unpushed changes I’ve got locally and replay them on top of what’s been pushed on the remote)
    fix conflicts if any following the instructions on the error provided by git (this is only needed on very active projects with multiple collaborators)
    git stash pop (to bring back my uncommited changes)

    Like

  4. Quick tip for git. Use ssh for authentication. First of all create a private/public key pair by running:

    ssh-keygen -t rsa
    

    Answer the questions, no need for a passkey now so you can just hit enter on all steps.
    Copy your public key by running

    cat ~/.ssh/id_rsa.pub | pbcopy
    

    On https://bitbucket.org/account/user/crgomo/ssh-keys/ click on “Add key” and paste what you have in memory from the previous command.
    The next time you do an operation on your repo it will be passwordless as long as you have on your project .git/config file something like

    [remote "origin"]
        url = git@bitbucket.org:crgomo/c-anto-me-puedo-gastar.git
        fetch = +refs/heads/*:refs/remotes/origin/*
    

    Like

  5. Thanks! I had already got the key but I wasn’t completely sure how to set it right. Now I tested and I got it working. 🙂
    I was checking the features of iTerm and I am really surprised of how a great program seems to be.
    Any suggestion about the configuration/theme to use?

    Like

  6. Wow!! I was looking for some tool like this one. It works like charm! Thanks a lot. 🙂
    Now that I have everything set, back to work with the code. I am excited and looking forward to learn and code as you expect.

    Like

Leave a reply to AirCrew Cancel reply