19

The word commit (substantive) refers to changes in source code that a software programmer puts into some repository. It's a technical term and in general we don't want to translate it while writing technical documentation.

However, often we use that word as a verb, like in committed or to commit. For instance, suppose I have these sentences:

The code was committed.

I'm talking about the committed code.

Possible translations could be:

O código foi enviado ao repositório.

Estou falando do código que foi comitado.

The former uses only Portuguese words, but I feel it loses its correlation with the term commit. The latter is a neologism (creates a new word) and looks strange in a formal document.

Is there a proper way to translate those sentences while keeping them referring to the original term, commit?

utluiz
  • 293
  • 1
  • 6
  • to commit changes to a repository. Eu diria: submeter alterações ao repositório: que nem aqui: Submeter as alterações ao repositório pai, através de um Pull Request http://producao.virtual.ufpb.br/books/producao-computacao-ead-ufpb/livro/capitulos/inicio-rapido.asc – Lambie Feb 05 '17 at 20:41
  • 1
    You might find that the people at portuguese stackoverflow stack overflow can help you with this one, being as how you're looking for programming specific vocabulary – Some_Guy Feb 07 '17 at 13:11
  • @Some_Guy Good advice. However, for me, particularly, I'm a mod there. :D – utluiz Feb 07 '17 at 20:16

4 Answers4

9

It looks to me that to commit code to the commit means to place the code in the commit and safely keep it there, as in committing someone to prison or hospital. So it appears to me that you’ll really have to choose between a neologism and a word that does not sound like commit. We can safely dispose of cometer: it doesn’t work in this context. But here’s an idea that may be better than enviar.

Depositar; depositei o código; o código está depositado; falo do código depositado.

This draws mainly on the meaning of depositar as placing and keeping valuables in a bank. It works better than enviar, because you cannot simply say enviei o código or o código está enviado, especially as enviar means to send only, not to keep. Eventually you might even substitute depósito for repositório and have a single word family.

You might want to consider armazenar or guardar. These work just like depositar in the examples above, but somehow I don't like them as much.

Jacinto
  • 44,937
  • 17
  • 141
  • 257
  • It's important to understand that enviar would never work because of the context semanthics of git: you commit a file to your local repository, and you can push commits to a remote repository (or pull them from a remote repository). Pushing and pulling do have the semanthics of enviar, but committing doesn't. – ANeves Apr 18 '19 at 18:55
  • (This is for git. In other source-control systems, such as CVS or TFS, you commit directly to the central repository; in those, committing might have "send" semantics.) – ANeves Apr 18 '19 at 19:04
  • @ANeves, I'm out of my depth here. I just thought of words that would work in the OP's examples. I do agree that 'enviar" does not always work, because it makes little sense to say "falo do código enviado". I mentioned the "depositar" suggestion to an IT-savvy friend of mine, together with the possibility of "levantar código" ('to pull from the repository, I guess; bank analogy), and he liked them both. – Jacinto Apr 18 '19 at 19:12
  • 1
    @ANeves I cannot help but recall that git’s "commit" is what we always used to call checking in one’s changes. Sometimes you even created a noun out of it, calling them "checkins". What all these are truly doing is nothing fancier than recording something in the formal log of incremental changes so that you can step forward and backward much as one would do in a text editor by a sequence of undo/redo operations. – tchrist Apr 18 '19 at 23:15
  • 2
    @Jacinto I agree that depositar “feels” better than guardar, although the latter could serve if absolutely necessary. I had actually considered armazenar but that feels even worse for vague reasons I can’t quite put my finger on; it may be because for me that verb carries heavier connotations of "housing" something or "storing" it than depositar does, possibly because of the verb’s lexical relationship with the noun armazém. – tchrist Apr 18 '19 at 23:24
  • Ultimately any options will feel wrong because the only word that absolutely expresses the meaning of comitar is... comitar! :-] We got so used to it, we don't even consider the actual meaning of the word - much like we wouldn't think of Portas when talking about The Doors. :) – ANeves Apr 19 '19 at 04:29
  • @tchrist, perhaps because "armazém" is mostly for things in transit, to keep them there just waiting to be sent somewhere else, whereas "depositar" is for safekeeping. – Jacinto Apr 19 '19 at 06:58
  • Eu discordo porque "commit", quando utilizado no desenvolvimento web/de software, é mais puxado para o sentido de fazer edições no código. Depositar ou armazenar não tem muito esse sentido. – Chanp Jul 20 '20 at 11:07
  • @Chanp, segundo o autor da pergunta e o tchrist (comentário acima), ambos especialistas em informática, o verbo commit significa enviar as alterações para um repositório (não é fazer as alterações). Naturalmente depositar na linguagem corrente não tem que ver com código: eu estou a propor um sentido novo para a palavra. Do mesmo modo, na linguagem corrente, to commit não tem nada que ver com código; um dos significados é commit someone to hospital/prison, e creio que veio daí inspiração para >> – Jacinto Jul 21 '20 at 09:56
  • to commit code (a pessoa fica à guarda do hospital (usa-se sobretudo acerca de hopistais psiquiátricos) ou prisão, como o código fica guardado no repositório (os outros significados correntes de to commit parecem ter ainda menos que ver com código). Eu usei a analogia com pôr dinheiro no banco, e tê-lo lá guardado. Dez pessoas, incluindo especialistas informáticos, acharam boa ideia.

    – Jacinto Jul 21 '20 at 10:01
3

I'm a system developer, and when it comes to code, I've never seen anyone translating "commit".

We usually say "fazer o commit" (do the commit) or just turn it into a verb: "comitar" ("eu comitei", "vou comitar", and so on)

2

Wikipedia seems to prefer the verb "submeter" (to submit), emphasis mine:

Commits também são feitos em sistemas de controle de versão para código fonte como o Subversion,Mercurial, Git ou CVS.[1] Um commit no contexto destes sistemas de controle de versão refere-se a submeter as últimas alterações do código fonte ao repositório e fazer com que estas alterações se tornem parte da versão principal (head) do repositório.

Here submeter is being used with the first definition found in priberam

  1. Pôr debaixo de. (Put under)

Seems to be a reasonable choice.

Although I would suggest the verb "guardar" (to save) like @Jacinto did, I have used quite few times myself as a developer.

O código foi guardado no repositório.

Estou falando do código que foi guardado (no repositório)

Bruno Costa
  • 1,108
  • 2
  • 8
  • 21
  • It's always good to know What people wrote at Wikipédia, but does submeter make sense (I'm not a programmer)? To me submeter suggests someone with authority is going to evaluate the code. – Jacinto Feb 04 '17 at 09:27
  • @Jacinto Here submeter is being used with the first definition found in Priberam - "pôr debaixo de" (Pôr no) – Bruno Costa Feb 04 '17 at 12:51
  • That's the danger of relying on a basic dictionary like Priberam. If you look up Houaiss or dicionário da Academia das Ciências, or Michaelis or Aulete you'll see that submeter means "impose one's will on" [someone] or else it's always submeter [someone/something] a (to) [someone's will, examination or evaluation]. You don't say submeter a chave ao tapete. My upvote though. – Jacinto Feb 04 '17 at 19:13
  • submeter alterações ao repositório. É preciso ver o que se usa, nem sempre os dicionários daram uma resposta adequada. – Lambie Feb 05 '17 at 20:42
  • @Jacinto, dizes então que não se pode "submeter uma candidatura", apenas enviá-la ou apresentá-la? E que esse uso de "submeter" é uma corruptela derivada do inglês "to submit"? – ANeves Apr 18 '19 at 19:00
  • @ANeves, creio que "submeter uma candidatura" poderá ter sido influenciado pelo inglês, mas parece-me bem. Os dicionários dizem que "submeter" algo a alguém significa apresentar algo à apreciação ou exame de alguém, que é o tu fazes à candidatura. – Jacinto Apr 18 '19 at 19:06
  • @ANeves, bem me parecia que estávamos para aqui a reviver o passado. – Jacinto Apr 18 '19 at 19:19
0

You can use commit in many situations:

  1. Commit meaning Send/Deliver/Dispatch:

The code was committed to archive: it was sent to the archive.
(O código foi enviado para arquivamento)

The soldier was committed to service: he was sent to work.
(O soldado foi enviado para serviço)

  1. Commit meaning Reserved/Locked:

The code is committed: it is reserved (in use) by someone
(O código está reservado)

The room is committed: it is reserved for someone.
(A sala está reservada)

  1. Commit meaning Engaged/Trust/Devote:

The crew is committed to work
(O grupo está comprometido com o trabalho)

The couple is committed to marry
(O casal está comprometido em casar)

And others.

ANeves
  • 7,117
  • 6
  • 29
  • 54
rmagalhaess
  • 227
  • 2
  • 11