For the most part, I’ve been doing all of my development on SlideNote out of a git repository located in an arbitrary directory on my hard drive.

Recently, I needed to move several projects to another location and since I had several changes that I’d yet to commit, I wanted to move the repository while keeping all of the changes intact.

Here’s how to do it using git’s bundle command:

Using the command line, navigate to the root directory of your git repository. Issue the following command but replace ‘slidenote’ with whatever name you’d like:

git bundle create slidenote.bundle master

You should see similar output:

Counting objects: 141, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (135/135), done.
Writing objects: 100% (141/141), 39.89 KiB, done.
Total 141 (delta 68), reused 0 (delta 0)

Next, navigate to the directory where you want to setup the new repository. Assuming that you want it to be located in ProjectsSlideNote, navigate to the Projects directory – not SlideNote. Git will actually create the project directory for you.

Once there, issue the following command:

git clone SlideNote.bundle -b master

After which you should see:

Cloning into SlideNote…

And a return to the command prompt along with the newly created directory.

Category:
Notes

Join the conversation! 2 Comments

  1. Nice tip! Haven’t yet had the need to do this but I’m sure it’ll come along eventually and this is great to know.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.