> warning: You appear to have cloned an empty repository. $ git clone /p/pDrive/git-repos/my-project.git # Clone the new repo in the location you want to do your work from > Initialized empty Git repository in P:/pDrive/git-repos/my-project.git/ $ mkdir /p/pDrive/git-repos/my-project.git Here’s a complete step-by-step example where I want my repo backed up by pCloud but stored on my E drive where I want to keep my working project: # Make the local git repo (this is using Git Bash) You can then go to the location on the hard drive where you want to have your working code stored and clone directly from the folder you ran the git init –bare command in and that’s it. You create the folder for your git repo inside of a folder that is always backed up to one of those services. The concept is this, you use any of the cloud backup services you have, Google Drive, Dropbox, pCloud, doesn’t matter. That magic command is all it takes to turn an empty folder into a git repo that you can clone from, push to, manage branches, view your revisions & history, all on your local hard drive. If you’re working on a solo project, and just want version history, branching, and peace of mind from having the code backed up until you’re ready to move on to a premium account on Github, you have a very fast & easy option to accomplish that: git init -bare Everyone’s usual go-to for making a new repo and storing code is Github, and it has loads of upsides, but if you don’t want that code publicly accessible, then you need to pay up.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |