Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

259
Vistas
How to use git to ignore some specific lines of a code on commit

For instance in this part of a code I need to ignore the line contain 'console.log' by git. Is it possible to define a tag or something like this to inform git to ignore that?

this.service.doRequest(req).subscribe(
   onComplete => {
      this.subActions = onComplete;
      console.log('Container(actions) result:',this.subActions);   //need to ignore this line by git
   }, onError => {}
);
about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

You cannot directly exclude a line on commit itself.

You can use git add -p to add specific parts of your file (except the one you do not want), and then commit.

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda