Skip to main content
AI Assist is now on Stack Overflow. Start a chat to get instant answers from across the network. Sign up to save and share your chats.
Active reading [<https://en.wikipedia.org/wiki/Git>]. Used more standard formatting.
Source Link
Peter Mortensen
  • 31.4k
  • 22
  • 110
  • 134

ifIf you have an OLDold backup and isare in a hurry:

makeMake a NEW BACKUPnew backup of your current, gitGit-broken, project path.

  1. move your .git to trash (never delete)
  2. copy .git from the OLDold backup
  3. git pull  (will create merge conflicts)
  4. move all your sources (everything you put in gitGit) to trash: ./src (never delete)
  5. .copy Copy all your sources (everything you put in gitGit) from the NEW BACKUPnew backup
  6. accept all "merges" at git gui, push and... clap your hands!

if you have an OLD backup and is in a hurry:

make a NEW BACKUP of your current, git-broken, project path.

  1. move your .git to trash (never delete)
  2. copy .git from the OLD backup
  3. git pull  (will create merge conflicts)
  4. move all your sources (everything you put in git) to trash: ./src (never delete)
  5. .copy all your sources (everything you put in git) from the NEW BACKUP
  6. accept all "merges" at git gui, push and... clap your hands!

If you have an old backup and are in a hurry:

Make a new backup of your current, Git-broken, project path.

  1. move your .git to trash (never delete)
  2. copy .git from the old backup
  3. git pull (will create merge conflicts)
  4. move all your sources (everything you put in Git) to trash: ./src (never delete)
  5. Copy all your sources (everything you put in Git) from the new backup
  6. accept all "merges" at git gui, push and... clap your hands!
deleted 8 characters in body
Source Link
phuclv
  • 43.2k
  • 16
  • 191
  • 558

if you have an OLD backup and is in a hurry:

make a NEW BACKUP of your current, git-broken, project path.

1 - move your .git to trash (never delete)
2 - copy .git from the OLD backup
3 - git pull (will create merge conflicts)
4 - move all your sources (everything you put in git) to trash: ./src (never delete)
5 - .copy all your sources (everything you put in git) from the NEW BACKUP
6 - accept all "merges" at git gui, push and... clap your hands!

  1. move your .git to trash (never delete)
  2. copy .git from the OLD backup
  3. git pull (will create merge conflicts)
  4. move all your sources (everything you put in git) to trash: ./src (never delete)
  5. .copy all your sources (everything you put in git) from the NEW BACKUP
  6. accept all "merges" at git gui, push and... clap your hands!

if you have an OLD backup and is in a hurry:

make a NEW BACKUP of your current, git-broken, project path.

1 - move your .git to trash (never delete)
2 - copy .git from the OLD backup
3 - git pull (will create merge conflicts)
4 - move all your sources (everything you put in git) to trash: ./src (never delete)
5 - .copy all your sources (everything you put in git) from the NEW BACKUP
6 - accept all "merges" at git gui, push and... clap your hands!

if you have an OLD backup and is in a hurry:

make a NEW BACKUP of your current, git-broken, project path.

  1. move your .git to trash (never delete)
  2. copy .git from the OLD backup
  3. git pull (will create merge conflicts)
  4. move all your sources (everything you put in git) to trash: ./src (never delete)
  5. .copy all your sources (everything you put in git) from the NEW BACKUP
  6. accept all "merges" at git gui, push and... clap your hands!
Source Link
Aquarius Power
  • 4k
  • 5
  • 39
  • 72

if you have an OLD backup and is in a hurry:

make a NEW BACKUP of your current, git-broken, project path.

1 - move your .git to trash (never delete)
2 - copy .git from the OLD backup
3 - git pull (will create merge conflicts)
4 - move all your sources (everything you put in git) to trash: ./src (never delete)
5 - .copy all your sources (everything you put in git) from the NEW BACKUP
6 - accept all "merges" at git gui, push and... clap your hands!