what are these - -- in github

0 votes
I've seen @@--@@ a lot and not able to understand what the numbers in between mean. Can somebody explain it to me?
Jun 27, 2018 in Git & GitHub by Hannah
• 18,570 points
1,949 views

1 answer to this question.

0 votes
This statement is called the hunk header.

You compare two files using the diff command and this command records differences as groups of        differing line and uses common lines to capture these groups within the files.

Such groups are called hunks of difference.

     for example,

     @@ -1,5 +1,4 @@

     Here "-" denotes the source file and "+" represents the modified file to which the change refers to.

     -1 represents the starting line from the source file

     5 represents the length of hunk

     +1 represents the starting line of modified or the to file

     4 represents the length of hunk, i.e., the hunk is 6 lines long
answered Jun 27, 2018 by anonymous

Related Questions In Git & GitHub

+1 vote
1 answer
0 votes
1 answer

What are the steps to work on any production issue in git?

Let's go through the steps to understand ...READ MORE

answered Nov 26, 2019 in Git & GitHub by Sirajul
• 59,230 points
1,156 views
–1 vote
1 answer

Having problem in Github and remote Git repo with production and development code

I think you could start with this. The ...READ MORE

answered Apr 10, 2018 in Git & GitHub by shubham
• 7,340 points

edited Dec 15, 2023 by Khan Sarfaraz 745 views
0 votes
1 answer

meaning of check-in code in github

It simply means to upload code to ...READ MORE

answered Apr 29, 2018 in Git & GitHub by ajs3033
• 7,300 points
9,515 views
0 votes
1 answer

Trying to analyse Sonarqube from Drone.io in Github PRs

Just try the below steps.The DRONE_PULL_REQUEST environment variable has ...READ MORE

answered Jun 27, 2018 in Git & GitHub by shubham
• 7,340 points
933 views
+15 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 27, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
3,459 views
+2 votes
1 answer
+1 vote
4 answers

GIT plugin in jenkins not able to connect to GIT repository

This looks like a git configuration issue, ...READ MORE

answered Oct 25, 2018 in Git & GitHub by Alia
18,784 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP