0

If a member who has commits in a git project quit from the project, will his commits remain in the repo, or those commits will removed when he leave?

By the way, is there any way to change the author(i mean assign(hand over) to another member) of his commits before he's leaving?

MrTux
  • 32,350
  • 30
  • 109
  • 146
  • 2
    Define "quit" in terms of git. Git doesn't particularly know or care about "members" or "projects" and hence they can't "quit" from it. And why would you be "handing over commits"? You don't have to stay with a project forever, that doesn't mean history changes when you leave. – deceze Apr 30 '15 at 09:06

1 Answers1

2

If a member who has commits in a git project quit from the project, will his commits remain in the repo, or those commits will removed when he leave?

Will remain. It's not accurate to say "quit" a Git project, as stated in the comments, Git doesn't care about members.

By the way, is there any way to change the author(i mean assign(hand over) to another member) of his commits before he's leaving?

You need to re-write all the history of the project.

Maroun
  • 94,125
  • 30
  • 188
  • 241
  • Thanks man! I'm a beginner in git, sorry for my incorrect, Thanks to you and deceze I learned something new today as well. But a last question: How could i manage re-write the history of project? Or just for example how can i change the author of a commit that is not belong to me? – Lajos Nektár Apr 30 '15 at 09:16
  • @LajosNektár You're welcome, we're all learn new things everyday. [This link](http://stackoverflow.com/questions/750172/change-the-author-of-a-commit-in-git) might help you. – Maroun Apr 30 '15 at 09:17
  • Why do you want to rewrite the history? You can't legally claim that commits were written by someone else (at least not in France) after the fact. If one past commit was written by someone, the fact that s/he left the project does not change anything. And if you're a beginner, then any answer containing "rewrite history" *should* scare you ;-). – Matthieu Moy Apr 30 '15 at 14:28
  • @MatthieuMoy you're right. I assume this will be done in a good spirit, where everyone agree on everything :) – Maroun Apr 30 '15 at 15:10