4 ms·
Oh, i meant the other 20 files all around the code base have just been changed to get my local setup to work. There is no way (without sub branching) in git to
by fayyazkl 13y ago
Oh, i meant the other 20 files all around the code base have just been changed to get my local setup to work. There is no way (without sub branching) in git to have a lot of modified files, but only wanting to revert the ones actually being worked upon. Core concept was still shallow check out in case of svn
- jakub_g 13y agoStill not sure what's the case exactly. You mean, kind of partially revert a commit, but only the files in the commit which are in a specific subfolder?
- fayyazkl 13y agoYeah Exactly. Probably i should have worded more appropriately. But given the fact that most of software developers have to maintain large existing code bases, tailor a specific subsection to achieve a goal and only need to commit just a folder in that sub section
- X-Istence 13y agogit checkout -- <file> This will revert the file back to the the last checked out version. git checkout <sha-1> -- <file> Will revert a file to the state it was in, in that particular sha-1.
- fayyazkl 13y agoYeah this will definitely do that. Only that mentioning name per file is painful. In large source trees, you often exactly don't know which files have been modified. You just have been following through a debug path making changes where needed. Just having the ability to checkout a folder down the hierarchy is really handy. Git recently added "sparse checkouts" but still they only solve the problem partially