18

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?

  • 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 producao.virtual.ufpb.br/books/producao-computacao-ead-ufpb/… – Lambie Feb 5 '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 7 '17 at 13:11
  • @Some_Guy Good advice. However, for me, particularly, I'm a mod there. :D – utluiz Feb 7 '17 at 20:16
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.

  • 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 at 18:55
  • (This 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" semanthics.) – ANeves Apr 18 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 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 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 at 23:24
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)

  • 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 4 '17 at 9:27
  • @Jacinto Here submeter is being used with the first definition found in Priberam - "pôr debaixo de" (Pôr no) – Bruno Costa Feb 4 '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 4 '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 5 '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 at 19:00
2

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)

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.