News for hackers. Stuff that matters.
Re:Key Git Concepts Explained the Hard Way by lmitchell on Wednesday March 14, 2018 @11:44PM (#16590287)
I moved from git to perforce when I switched companies, and even though I actually really like git and consider myself reasonably proficient, I don't mind perforce.

My one real pain point with it isn't so bad, but I dislike how perforce tends to work at a file level instead of a commit level. It's hard for me to make several related changes which all touch the same files, like a series of patches which all refactor the same area of code, but which I would like to review and discuss separately, and potentially revert some/all of.

It's hard to manage this with shelves, because perforce can't handle unshelving the same file in two different CLs. I could submit all the changes to a separate stream, but perforce streams just don't usually work well for us, and it's still hard to experiment by constantly making and rolling back changes.

I guess I'm probably only used to this workflow because I have experience with git, but this is the time when I really miss the granularity of a git commit (and I'm doing a pretty gigantic refactor right now... so it's hitting me quite hard).

Re:Key Git Concepts Explained the Hard Way by dotancohen on Thursday March 15, 2018 @03:26AM (#16590994)
I recently had to do something similar with an ancient SVN repo, that had to stay in SVN.

I simply started a git repo in the same base directory as the SVN repo, and did my work in there. Every time I merged a branch back to master I committed to SVN's ^/branches/dev. Just add `.svn` to `.gitignore` and `.git*` to the SVN prop ignore.

You _will_ want to merge from upstream (Whatever Perforce's equivalent to `svn up` or `git pull` is) often, I was merging from upstream before every SVN commit (SVN mostly forces you to do this, `svn status --show-updates` is a huge help here but I don't know if Perforce has a similar feature).

Re:Key Git Concepts Explained the Hard Way by erik_seaberg on Thursday March 15, 2018 @11:09AM (#16593473)
There are googlers who do the same thing, mostly work in git until the branch is ready for one big perforce changelist to review and commit.
Re:Key Git Concepts Explained the Hard Way by malkia on Thursday March 15, 2018 @01:00AM (#16590494)
Not ideal, but you can use shelves, branches or streams. Or even complement it with .git there (it still works).