Importing a new project in Git

I’m working on the ProTalk project and one of the things I needed to do was to import the initial code for the project into our private bitbucket repository. I created the repository online, but since this is my first time working with Git I didn’t know how to import the code into this repository. As it turns out it was very simple (like with everything that is simple once you know how to do it) and it only took a few commands to get it working.

Go to the directory where the code is and use the following commands:
git init
git add *
git commit -m “Initial import”
git remote add origin <repository url>
git push origin master

That’s all there is to it, but it took me some time to figure it out. I will certainly learn a lot more using Git for this project, since this is the first time I’m using a Distributed Versioning Control System and I can’t wait.

This entry was posted in PHP, ProTalk and tagged , . Bookmark the permalink.

2 Responses to Importing a new project in Git

  1. Right here is the right site for anybody who
    wishes to understand this topic. You realize so much its
    almost tough to argue with you (not that I personally would want to…HaHa).
    You definitely put a brand new spin on a subject
    that has been discussed for years. Great stuff, just wonderful!

  2. Its like you read my mind! You appear to know so much about this,
    like you wrote the book in it or something. I think that you could
    do with a few pics to drive the message home a little bit, but other than that, this is magnificent blog.
    An excellent read. I will definitely be back.

Leave a Reply

Your email address will not be published. Required fields are marked *

*