1

My current version is not working and I want to upload a working version onto my current repo, possibly onto a new branch.

To be honest, all I did was add an app icon and now it's broken. :( I tried to revert, but I don't understand how to effectively, and I can't seem to wrap my head around the documentation. I also tried to just copy/paste the differences into my code, but either Swift or Xcode sucks and won't understand that the project should run again.

If you think it'll help, this is the commit I want: https://github.com/cleanupyourcity/CleanupYourCity/tree/af8fd38ce5c6aaa19ff18b6eaf025c07c1534109

And this is my repo: https://github.com/cleanupyourcity/CleanupYourCity

I am hoping to have a new branch in my repo with the last working version.

tkruse
  • 10,222
  • 7
  • 53
  • 80
  • There are many similar questions: https://stackoverflow.com/questions/3639115 https://stackoverflow.com/questions/4114095 https://stackoverflow.com/questions/927358 Your question might be more clear if you explained your motivation, why you want multiple branches and what the purpose of those branches would be. – tkruse May 12 '19 at 06:27
  • I did explain my motivation, I said my current version isn't working and am hoping to have a new branch with the last working version. – Sovreign-Ariel McCarthy May 13 '19 at 02:33
  • I mean explaining the motivation for the new structure, like: "I want one branch to be A so that other people can do B, and a second branch to be C so that other people can do D." – tkruse May 13 '19 at 02:46
  • Or possibly explain what workflow the team of people commiting to this repository have agreed upon, as an example compared to https://git-scm.com/book/en/v2/Git-Branching-Branching-Workflows – tkruse May 13 '19 at 02:49
  • Given the literal answer seems to solve the question, the question seems a duplicate of https://stackoverflow.com/questions/2765421 – tkruse May 15 '19 at 23:44

1 Answers1

0

What you literally ask for is how to add a branch of a specific version. This can be achieved like this:

git checkout af8fd38c --branch working_branch
git push origin working_branch

after that, you should see the new branch "working_branch" in github in the "branch" dropdown.

Note that most projects would rather do it the other way round, keep working versions in the master branch, and experimental versions in other branches. Since you seem to be cooperating with other authors on this repository, make sure to let them know what you are doing.

tkruse
  • 10,222
  • 7
  • 53
  • 80