Tag Archive | analysis

Synchronized Code Developing Using GIT and DROPBOX

Simplify your life, if you have too much troubles in code developing with your staff. One of the usual ways is to use a common server and install a Concurrent Versions System (CVS). If you don’t have such facilities around you, you can get a free common server which always readily serve for your interests using DROPBOX. This is a great service! Subscribe to site, invite your staff and start sharing your code or documents through it now.

When it comes to use a CVS, i can suggest you to make the best of using GIT. It is an free & open-source distributed version control system designed to handle everything from small to very large projects with speed and efficiency. If your code is in a <code_folder> and you installed GIT successfully, use below steps to be synchronized with your staff using DROPBOX now.

If you are the first person who will share your code with your staff through DROPBOX:

  • Open terminal and cd into your code folder.
  • Write “git init”
  • Write “cd .git” and you’ll see branches, objects and config files here.
  • Edit your git config file writing “nano config”. Your config file should be like that in order to stay synchronized through DROPBOX:

[core]

repositoryformatversion = 0

filemode = true

bare = false

logallrefupdates = true

[user]

        name = <USER NAME>

        email = <EMAIL ADDRESS>

[remote "origin"]

url = /Users/kuday/Dropbox/git-archive/.git

fetch = +refs/heads/*:refs/remotes/origin/*

[branch "master"]

remote = origin

merge = refs/heads/master

  • Save your config file and come back to terminal, then write “git add . ” This will add all of the files in to git repository.
  • Move <codefolder>.git into your DROPBOX and send invitation to your staff to share this code.
  • You’ll see your code repository in sharing after you open your dropbox as <codefolder>.git
If you are not the first person who creates the git repository for your code and you can reach <codefolder>.git file through DROPBOX, things are even easier to clone it into your computer:
  • Open terminal in DROPBOX and copy your <codefolder>.git (–> its behaviour is like a zip file) in to a proper location.
  • Go to this location and write “git clone <codefolder>.git” .This will create back your entire code.
  • Write “cd <codefolder>”
  • Edit your config file in .git folder as above.
  • Write “git add .” on your terminal.
  • Start developing!
SOME USEFUL GIT COMMANDS:

git pull origin master
This command gets the latest changes from your staff. Don’t forget to do it often.
git commit -m “Here will be written some messages after editing the code”
After you decide to share the new version of your code with your staff, this command will search for changed files in the repository and updates DROPBOX. You’ll see a spinning wheel near DROPBOX icon which means that you started sharing you new code.
git log
This will show you the entire history of code developing with users, comments and dates.
gitk 
This command opens a useful interface to trace user activities and changes.
git merge origin
This will merge the separate branches which bear different users developments. Use this command if you believe that your code branching too much.