News for hackers. Stuff that matters.
Re:Git-SIM: Visually simulate Git operations in your own rep... by capableweb on Sunday January 22, 2023 @12:30PM (#34479820)
> simulate actions on Git repos without actually modifying them

One way around this could be to create a new temporary directory in /tmp, copy .git over there and symlink the rest, then run whatever operation in the newly copied workspace and compare it with the original.

Then you can mutate things however you want and the original stays the same.

Re:Git-SIM: Visually simulate Git operations in your own rep... by initialcommit on Sunday January 22, 2023 @01:30PM (#34480549)
Hey cool idea! I'll definitely consider that and variations on it. This could work for Pull-direction operations like fetch/pull, but maybe not as well for push since the remote would still be affected in some way.

Will need to think about it more...

Re:Git-SIM: Visually simulate Git operations in your own rep... by jfcnotagain on Sunday January 22, 2023 @01:55PM (#34480921)
You can push to a folder too. So you can just do the same thing. Clone the remote into a folder and push into it.
Re:Git-SIM: Visually simulate Git operations in your own rep... by capableweb on Sunday January 22, 2023 @02:24PM (#34481302)
Was gonna suggest the same! I use this countless of times. It's really cool how you can push/pull to a bunch of different things, including directories, ssh hosts, anything that can act as a directory (network mounted FUSE directories) and more.

Personally I use it a lot for backing up git repositories to a USB stick where I have a backup of every single repository + its branches and commits in case I ever need to recover from them. And I can keep my GitHub remotes clean without 100s of branches.