Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[QZ0] Git-Add & Git-Commit directory #17

Open
ZacIsrael opened this issue Jan 19, 2022 · 5 comments
Open

[QZ0] Git-Add & Git-Commit directory #17

ZacIsrael opened this issue Jan 19, 2022 · 5 comments
Assignees
Labels
quiz Questions and comments about quizzes

Comments

@ZacIsrael
Copy link

The '[Git] - [Add]' and '[Git] - [Commit Directory]' directory options are not available in PyCharm. Do you know why this may be?

@ZacIsrael ZacIsrael added the quiz Questions and comments about quizzes label Jan 19, 2022
@SichangTu
Copy link
Collaborator

Hi, please try right-clicking on the file/directory you want to add to git with your mouse and you will see the context menu as shown in the screenshot. Then you can select Git - Add to add the file/directory to git and Git - Commit File/Directory to commit it. Or you can use the git add and git commit commands in the PyCharm terminal.

Screen Shot 2022-01-19 at 1 01 20 PM

@ZacIsrael
Copy link
Author

Good afternoon. The “Git” option does not even show up when I right click. I tried adding the files via the command line and it still did not work so I manually uploaded them.

@ZacIsrael
Copy link
Author

no-git

@ZacIsrael ZacIsrael reopened this Jan 20, 2022
@SichangTu
Copy link
Collaborator

Hi, it is probably because you create the cs329 directory on your local machine instead of opening the Git repo via Get from VCS. So this directory is not a git repo yet. In this case, there are two ways to fix it:

  1. Adding the local directory to the GitHub repo following these steps:
  • git init initialize your local directory as a Git repo
  • git add . add all files to the next commit. You can add the files you don't want to push into the .gitignore file.
  • git commit -m "<commit message>" commit the changes
  • git remote add origin <remote repo url> add remote origin
  • git remote -v verify the remote repo
  • git push origin master push your changes
  1. Open the project via Get from VCS following the getting_started page. Copy what you have in your local machine to the newly opened project.

@ZacIsrael
Copy link
Author

I created the cs329 directory from "Get from VCS." I'll just do everything over again. Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
quiz Questions and comments about quizzes
Projects
None yet
Development

No branches or pull requests

4 participants