0

I work on an application in Python that is developed by a small team.

I need to remember the state of the code at regular points in time for myself, and occasionally I need to commit the code to the group. However, they do not want to see the 10s of intermediate commits I do.

So I am looking for a way to have 2 repositories with independent histories. Or some other smart suggestion!

bahrep
  • 29,961
  • 12
  • 103
  • 150
ManInMoon
  • 6,795
  • 15
  • 70
  • 133
  • `However, they do not want to see the 10s of intermediate commits I do.` Why not? How about working on another branch and merging to master regularly using a non-ff merge? – tkausl Jul 06 '22 at 09:35
  • The question is tagged with git and svn. So is the question about svn or git? You need to elaborate and fix the tags. – bahrep Jul 06 '22 at 09:46
  • I am using git, but I tagged svn because I am open to using both if that is the solution – ManInMoon Jul 06 '22 at 10:26
  • @tkausl I don't know what non-ff merge is - can you clarify please. Also I don't want to lose my multiple commits - so they need to remain on my system. – ManInMoon Jul 06 '22 at 10:29
  • This question for me look like opinion based one. There are multiple ways to achieve what you want. What you can do? For example you can create branch locally, and when there will be time to show your code to other developers, you can [squash](https://stackoverflow.com/questions/5189560/how-to-squash-my-last-x-commits-together) your commits in remote branch. No need to create 2 repositories (but of course you can do that as well) – kadewu Jul 06 '22 at 11:28
  • Don't use multiple repos, stripping intermediate commits is done with squash merge, so squash-merge your full-fat history onto the (more-)publishable upstream tip when you've got a result they want to see. – jthill Jul 06 '22 at 15:56

1 Answers1

0

I need to remember the state of the code at regular points in time for myself

Use tags

I need to commit the code to the group. However, they do not want to see the 10s of intermediate commits I do.

  • Clone repo
  • Commit into this local clone
  • When you'll have any milestone, join your history into one commit with git merge --squash
  • Push results
Lazy Badger
  • 94,711
  • 9
  • 78
  • 110