defunkt / cijoe

CI Joe is a fun Continuous Integration server. Unmaintained.
MIT License
1.05k stars 129 forks source link

Unpushed changes are getting purged #53

Closed ifesdjeen closed 13 years ago

ifesdjeen commented 13 years ago

Steps to reproduce:

  1. cd ~/project/directory
  2. touch asdasda
  3. git add asdasda
  4. git commit -m "Test"
  5. cijoe
  6. Push "Build" in web interface
  7. Your changes are lost.
queso commented 13 years ago

ifesdjeen,

Your cijoe should run on a separate copy. Your changes are lost, as cijoe does a hard reset against the remote repo and wipes out any local changes/commits.

This is really a necessary step to ensure that you don't end up with file conflicts when you need to run tests.

ifesdjeen commented 13 years ago

Awesome. Can you put into docs so that anyone else wouldn't do the same mistake I've done?..

queso commented 13 years ago

ifesdjeen,

I am not the project owner, but I would be happy to, once I get some other updates I've done a pull request for are merged in.

ifesdjeen commented 13 years ago

Thank you very much!

ifesdjeen commented 13 years ago

BTW: One last thing before you run off to learn all the Git commands: remember that it is almost impossible to lose work that has been committed. Even when you delete a branch, all that’s really happened is that the pointer to that commit has been removed. All of the snapshots are still in the objects directory, you just need to dig up the commit SHA. In these cases, look up git reflog. It contains a history of what each branch pointed to and in times of crisis, it will save the day.

(c) http://tom.preston-werner.com/2009/05/19/the-git-parable.html