What is difference between fork and branch? How to create tag?



What is difference between fork and branch? How to create tag?..

Answer / Lalit Chahal

In Git, a fork represents a copy of a remote repository under a new owner, while a branch is a separate development line in a single repository. To create a tag, use the following command: `git tag <tag_name>`n- To create an annotated tag with a message, use `git tag -a <tag_name> -m '<commit_message>'`. You can list all tags using `git tag`.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Git Interview Questions

What work is restored when the deleted branch is recovered?

1 Answers  


What is the function of ‘git diff ’ in git?

1 Answers  


What is a git commit and what does the commit object contain?

1 Answers  


How can you use git bisect to determine the source of a (regression) bug?

1 Answers  


What is ‘git add’ is used for?

1 Answers  


What are the benefits of using version control system?

1 Answers  


Name some git commands and also explain their functions?

1 Answers  


What is ‘head’ in git?

1 Answers  


What is difference between fork and branch?

1 Answers  


Describe the branching strategies you have used.

1 Answers  


Explain the advantages of forking workflow?

1 Answers  


What is git and why do we use it?

1 Answers  


Categories