Monday, November 18, 2013

Posted  by  & filed under git.
Don’t you ever setup another version control server, Mercurial, SVN, CVS, or any other you may know.

What is GIT?

“In software development, Git /ɡɪt/ is a distributed version control and source code management (SCM) system with an emphasis on speed. Initially designed and developed by Linus Torvalds for Linux kernel development, Git has since been adopted by many other projects.”

What is Dropbox

“Dropbox is a file hosting service operated by Dropbox, Inc., that offers cloud storage, file synchronization, and client software. Dropbox allows users to create a special folder on each of their computers, which Dropbox then synchronizes so that it appears to be the same folder (with the same contents) regardless of which computer is used to view it. Files placed in this folder also are accessible through a website and mobile phone applications.”

How to setup a GIT repo into your Dropbox account

Of course most of you already know what is GIT or Dropbox, so let’s start with the cool part of the post. Obiously you need to have Drobox and GIT installed on you PC or laptop.
1. First you need to create an empty folder on your Dropbox.
?
1
2
:~$ cd Dropbox
:Dropbox$ mkdir project_name
2. Init the remote folder into your local Dropbox
?
1
2
3
:Dropbox$ cd project_name/
:project_name$ git init --bare
Initialized empty Git repository in /Users/zantez/Dropbox/project_name/
Perform an ls command and you’ll see some folders
?
1
2
[BARE:master]:project_name$ ls
HEAD config description hooks info objects refs
3. Now lets clone the current GIT repository to a destination on your PC or laptop
?
1
2
3
4
5
:git$ git clone ~/Dropbox/project_name project_name_local
Cloning into 'project_name_local'...
warning: You appear to have cloned an empty repository.
done.
:git$ cd project_name_local/ [master]:project_name_local$
4. Let’s perform an initial commit and push it into the origin
?
1
2
3
4
5
6
7
8
9
[master]:project_name_local$ ls test.txt
[master]:project_name_local$ git add -A
[master]:project_name_local$ git ci -m "initial commit"
[master (root-commit) 6916e97] initial commit 1 file changed, 0 insertions(+), 0 deletions(-) create mode
    100644 test.txt
[master]:project_name_local$ git push origin master Counting objects: 3, done.
Writing objects: 100% (3/3),
219 bytes, done. Total 3 (delta 0), reused 0 (delta 0)
To /Users/zantez/Dropbox/project_name * [new branch] master -> master
Now you’re all set, start working on your GIT project ;)

or maybe you need to….

Clone your local GIT repo into your Dropbox account

Thanks to @httpdss for this contribution.
Go to your dropbox folder and clone your local repo with the –bare option
?
1
git clone --bare ~/local_repo local_repo.git
Go to your local_repo folder and add dropbox git repo you’ve just cloned as a remote
?
1
git remote add dropbox ~/Dropbox/git/woow/sooprise_site.git
It’s done! but remember to push your local changes into dropbox remote.
?
1
git push dropbox master

4 comments:

oakleyses said...

louis vuitton handbags, oakley sunglasses, louboutin, longchamp outlet, nike shoes, louis vuitton outlet stores, chanel handbags, burberry outlet, prada outlet, jordan shoes, tiffany and co, michael kors outlet, tory burch outlet, louis vuitton outlet, longchamp handbags, nike free, true religion jeans, michael kors outlet, kate spade outlet, polo ralph lauren outlet, tiffany and co, prada handbags, polo ralph lauren outlet, michael kors outlet, michael kors outlet, longchamp handbags, oakley sunglasses, ray ban sunglasses, kate spade handbags, burberry outlet, louis vuitton outlet, louboutin outlet, louboutin, coach factory outlet, air max, air max, coach outlet, gucci outlet, christian louboutin shoes, michael kors outlet, coach purses, ray ban sunglasses, michael kors outlet, louis vuitton, coach outlet store online, true religion jeans, oakley sunglasses cheap

oakleyses said...

ralph lauren, lululemon, air max, hollister, north face, nike air max, polo lacoste, vanessa bruno, timberland, vans pas cher, louboutin, louis vuitton, oakley pas cher, air max pas cher, nike roshe run, air max, true religion outlet, barbour, sac longchamp, air force, hollister, sac louis vuitton, nike free, polo ralph lauren, nike trainers, louis vuitton uk, nike roshe, sac hermes, longchamp, michael kors, sac burberry, sac guess, mulberry, new balance pas cher, converse pas cher, sac louis vuitton, hogan outlet, nike tn, north face, true religion outlet, ray ban pas cher, michael kors, air jordan, nike blazer, nike free pas cher, michael kors pas cher, abercrombie and fitch, ray ban sunglasses

oakleyses said...

mac cosmetics, mont blanc, marc jacobs, canada goose outlet, nike huarache, vans shoes, soccer jerseys, hollister, giuseppe zanotti, beats by dre, abercrombie and fitch, longchamp, insanity workout, celine handbags, bottega veneta, ghd, nfl jerseys, north face outlet, chi flat iron, ugg boots, birkin bag, ugg australia, canada goose, herve leger, ugg pas cher, rolex watches, valentino shoes, canada goose uk, canada goose, ferragamo shoes, canada goose, ugg boots, uggs outlet, north face jackets, soccer shoes, asics running shoes, new balance shoes, p90x, lululemon outlet, canada goose jackets, mcm handbags, instyler, babyliss pro, ugg, wedding dresses, jimmy choo outlet, reebok outlet, nike roshe run

oakleyses said...

parajumpers, karen millen, air max, converse, pandora charms, moncler, louboutin, moncler, links of london, lancel, juicy couture outlet, oakley, hollister, pandora charms, supra shoes, thomas sabo, canada goose, gucci, wedding dresses, timberland boots, swarovski crystal, air max, coach outlet store online, moncler, ray ban, canada goose, moncler, ugg, louis vuitton, swarovski, hollister, montre homme, moncler, hollister clothing store, ralph lauren, rolex watches, moncler outlet, moncler, iphone 6 cases, baseball bats, juicy couture outlet, toms shoes, vans, pandora jewelry, ugg, converse shoes