Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

252
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!