Software giant Github has apologised for firing a Jewish employee who warned co-workers to be careful about Nazis.
The employee was fired two days after using the word to describe participants in the US Capitol riots.
But Github now says that decision was a mistake, and its head of HR has resigned over the scandal.
The company says it has offered the fired employee his job back, and clarified that "employees are free to express concerns about Nazis".
Microsoft-owned Github is one of the most popular software development tools in the world, with more than 50 million users. News of the internal row was first reported by Business Insider.
People associated with a range of extreme and far-right groups and supporters of fringe online conspiracy theories stormed Congress.
As it happened, the Jewish employee posted to an internal Github Slack channel: "Stay safe homies, Nazis are about."
But the comment sparked criticism from a co-worker about the use of the word "Nazi" to describe the rioters, calling it "untasteful conduct" for the workplace.
The Jewish employee, who wished to remain anonymous, told Techcrunch he had been "genuinely concerned about his co-workers in the area, in addition to his Jewish family members".
Two days later, he was fired for his "patterns of behaviour".
But the firing led to an outcry from many more co-workers, with hundreds signing an internal letter calling on Github to explain the decision - and to publicly denounce Nazis.
Amid the outcry, the company opened an investigation with an external investigator.
"The investigation revealed significant errors of judgment and procedure," chief executive Erica Brescia wrote in a blogpost. "Our head of HR has taken personal accountability and resigned from GitHub."
She said the firm had "reversed the decision to separate with the employee", and had contacted him - but it is not clear if the employee wishes to return after the treatment he received.
The company has also issued statements condemning white supremacists, Nazism, anti-Semitism, and those who took part in the Capitol riots.