Skip to content

Latest commit

 

History

History
30 lines (24 loc) · 1.62 KB

lesson2.org

File metadata and controls

30 lines (24 loc) · 1.62 KB

What happens when you initialize a repository? Why do you need to do it?

To start tracking the files in there. This action creates a .git directory that contains the git metadata.

How is the staging area different from the working directory and the repository? What value do you think it offers?

It offers total flexibility and control over the changes you would like to commit each time.

How can you use the staging area to make sure you have one commit per logical change?

You can compare the changes made between the workinfg directory, staging area and the last commits and make sure you make a commit by logical change.

What are some situations when branches would be helpful in keeping your history organized? How would branches help?

When you are working in multiple features of the main project, for example when you make a complete redesign of it but you’d like to keep the original working. It also helps when you need to merge the changes.

How do the diagrams help you visualize the branch structure?

They allow me to clearly see how git organizes the commits and the branches, and which of them are accesible or not.

What is the result of merging two branches together? Why do we represent it in the diagram the way we do?

The result is one tip that represents the changes of the two branches. This is the reason of the representation in the diagram.

What are the pros and cons of Git’s automatic merging vs. always doing merges manually?

Cons: Error-prone. Need to check and understanf¿d the additions on the file. Pros: Accomplishes the mission of spotting the error and letting people choose what to change. Flexibility.