0

I'm working on a WordPress plugin that I started developing before I started using Git. At one point, I created a copy of the plugin in a different folder to experiment with an alternate way of writing one part of the plugin. I recently purchased Tower and started using Git to track changes for my plugins. I've created a local repo using the first version of this plugin. However, I'd like to add in that second version I created earlier as a branch of the main plugin.

Using Tower as the OS X Git client, how does one add existing files from a different folder as a branch to an existing repo?

I've already tried Refs > Add New Local Branch, but it doesn't add the second version's files, nor does it have a way to point to those files. If I drag the second version's folder from Finder to the Tower icon, it creates a whole new repo. Would I need to do that and somehow merge that in as a branch?

I'm fairly new to Git as a whole and I'm sure there's probably a way to do this easily through CLI, but I'd love to make this work through Tower.

Slushman
  • 315
  • 1
  • 3
  • 8

1 Answers1

0

Ok, I think I've figured this out. Instead of adding the existing files in as a branch, I created a branch, made sure in Tower the new branch was the HEAD, then opened my original project and copied and pasted code from the second version to the first, then committed the changes in Tower. Its working. Git is pure magic.

Slushman
  • 315
  • 1
  • 3
  • 8