0

I need to collect all the code that has been worked on so far by a developer that is moving on. Most of it is not ready to be pushed to our development branch.

If they zip and share their .git folder with me, would that be enough to have all of their local work? As in replace my .git folder with theirs to be able to look through the branches they have created and all commits, changes, and history on those branches, i.e. all work that has not been pushed to the remote repository.

karnosiris
  • 35
  • 1
  • 2
  • 8
  • 1
    Why not push to different branches? Branches are cheap, you can create and then remove them in hundreds. If not branches — why not [bundles](https://stackoverflow.com/a/49101839/7976758)? – phd Feb 18 '21 at 16:05
  • Thanks I was not even aware of bundles. This sounds like exactly what I need. But to confirm that I'm understanding correctly, if for example I run: git bundle create everythingworkedon.bundle --all That is essentially creating like a packaged up repository that can be sent as a file? Including all commits, branches, etc. Basically everything? Thanks for your help. – karnosiris Feb 18 '21 at 18:04
  • 1
    Commits and references (branches and tags). It's less then full `.git/` but usually exactly what you need. The entire `.git/` contains local configuration not always suitable for publishing — local `config`, local hooks, local `info/exclude`. – phd Feb 18 '21 at 18:54

0 Answers0