Skip to content
This repository has been archived by the owner on Feb 13, 2020. It is now read-only.

questions about committing changes using version control #549

Open
zhonghaohui opened this issue Sep 16, 2019 · 4 comments
Open

questions about committing changes using version control #549

zhonghaohui opened this issue Sep 16, 2019 · 4 comments

Comments

@zhonghaohui
Copy link

Hi all!

When using version control of Git, two new files namely .gitignore and STAT545-participation.Rproj should be generated, as shown in Dr. Vincenzou's repo. But there is only STAT545-participation.Rproj in my local repo, why does .gitignore not being made? (already make hidden files visible

The second question is that we need to commit changes when new files are made locally. This should be done in the 'Git' window in rstudio. But there's just nothing in my git window while actually
STAT545-participation.Rproj is made. Why is that? How can I stage and commit changes then?

btw I am using a windows laptop.

Is anyone in the teaching team available today? Can we meet and see how to figure it out?
@545a-2019-20-team

微信图片_20190916133809
微信图片_20190916133750

@hsmohammed
Copy link

The .gitignore file should have been created by github when you first created the repo by checking a box, or you can create it yourself (see attached image).
Try creating another dummy file and see if you can stage it for commit. The .Rproj file is by default added to gitignore anyway.
image

@vincenzocoia
Copy link
Member

The .Rproj file might have already been put in the commit history unknowingly. Does the .Rproj file also appear on your remote (github.com) repository after pushing to github? If so, then it's already in your history. If not, then my guess is that there is indeed a hidden .gitignore file somewhere that's telling git to ignore .Rproj files.

@zhonghaohui
Copy link
Author

No the .Rproj file is not put in unknowningly. I need to run codes in terminal to add files, commit and push.

The git pane seems to be disabled. Even if I add something in the readme.md file, nothing shows up in the git pane. And I checked the remote repo, its readme file is not updated.
@vincenzocoia

@vincenzocoia
Copy link
Member

My next guess is that you haven't opened the .Rproj file in RStudio. In RStudio, go to File -> Open Project... then find the .Rproj file that we've been talking about. The git panel should show up after opening the project.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants