oDesk Preparation

Friday, July 19, 2013

always use github to manage your project code

it's always wise to use a source code version control system. so that your code can be tracked every minor change and you can roll back as needed. i found github is a very useful one. they have both free & paid membership and you can choice whatever you need. if you are a windows user click here to download github client version into your computer.
click "download 1.0"(or any other updated version) and once it's downloaded double click on it.
from github site this small exe(669kb) will download fully functional rest parts(around 40 mb).
once full version is installed you are now ready start with github.
click installed github icon. provide your email/username and password to connect with your github account.
now create project, connect with project and check-in, check out pages.
Now if you create a new file and open github you may not able to commit without shell script. if failed then try shell mode.

Configure github command line: you have to set your email address and name. in order to do so
C:\Users\Sumon\Documents\GitHub\MyProject [master +1 ~0 -0]>  git config --global user.email "myemailid@gmail.com"
C:\Users\Sumon\Documents\GitHub\MyProject [master +1 ~0 -0]> git config --global user.name "Amin"

write following code to add a file into your project:
C:\Users\Documents\GitHub\MyProject [master +1 ~0 -0]> git add test-file.php
C:\Users\Documents\GitHub\MyProject [master +1 ~0 -0]>
Files added.
C:\Users\Documents\GitHub\MyProject [master +1 ~0 -0]>git status
=>See which files have been committed, Green files have been committed, uncommitted red ones .
Once you've committed all, 
C:\Users\Documents\GitHub\MyProject [master +1 ~0 -0]>git commit
Now go back to Github for Windows and sync it up.
Enjoy Sub Versioning.

No comments:

Post a Comment