What is the workflow for git + RStudio projects?

I'm a git novice but I want to start adopting better practices.

I was able to follow some of the resources from Jenny Bryan (Chapter 28 Pull, but you have local work | Happy Git and GitHub for the useR), but I have some questions.

First, what does the syntax "A--B--C" refer to? I gather that "A", "B", "C" are files, but what does the presence or absence of the letter mean, and what do the dashes mean?

Second, I have succesfully made some repos and and commits and pushes in the past, but I never had to merge. I was always working on different files from my colleagues. The book refers to a git merge "kicking you to a text editor". What exactly does that mean?

                 Remote: A--B--C

Local before 'git pull': A--B--(uncommitted changes)
 Local after 'git pull': A--B--C--(uncommitted changes)

A, B and C refer to commits, that is, saved states of the entire repo. Typically, they would represent the state of many files, though it might be just a single R script and a few housekeeping files. The dashes represent the path from one commit to another. The example you give shows a simple progression and the dashes do not add much. You can have cases where two different commits start from commit A forming branches of commits and then the dashes guide the eye along each branch.

If I am thinking of the right thing, "kicking you to a text editor" means that if you commit without specifying a commit message, Git will open an editor where you can type a message. (I have never thought I wrote too much in a commit message)

1 Like

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.