Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
5 views

Using Git and GiHub in VSCode and PyCharm IDE

The document outlines the necessary installations for Python and Machine Learning training, including tools like Python, Git, GitHub, Visual Studio Code, PyCharm, and Anaconda Navigator. It provides detailed instructions on using Git and GitHub within Visual Studio Code and PyCharm, covering the installation of extensions and the process of staging, committing, and pushing files to GitHub. Video references are included for further guidance on these processes.

Uploaded by

vermadhani633
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views

Using Git and GiHub in VSCode and PyCharm IDE

The document outlines the necessary installations for Python and Machine Learning training, including tools like Python, Git, GitHub, Visual Studio Code, PyCharm, and Anaconda Navigator. It provides detailed instructions on using Git and GitHub within Visual Studio Code and PyCharm, covering the installation of extensions and the process of staging, committing, and pushing files to GitHub. Video references are included for further guidance on these processes.

Uploaded by

vermadhani633
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

PYTHON & MACHINE LEARNING TRAINING SESSION-1 INSTALLATIONS

Required Tools and Software


1. Python https://www.python.org/
2. Git https://www.git-scm.com/
3. GitHub https://github.com/
4. Visual Studio Code https://code.visualstudio.com/
5. PyCharm IDE
https://www.jetbrains.com/pycharm/download/?section=windows
6. Anaconda Navigator https://www.anaconda.com/download

Nidhi Grover Raheja | LINKEDIN PROFILE: www.linkedin.com/in/nidhi-grover-raheja-904211138


PYTHON & MACHINE LEARNING TRAINING SESSION-1 INSTALLATIONS

Using Git & GitHub in Visual Studio Code: Stage, Commit, and
Push
Install GitHub Pull Requests and Issues extension in Visual Studio Code. Also how to add files
from Visual Studio code to GitHub

Let us break this down into two steps:

1. Installing the GitHub Pull Requests and Issues Extension in Visual Studio Code:
o The GitHub Pull Requests extension allows you to review and manage
GitHub pull requests and issues directly within VS Code. Here’s how to get
started:
1. Open Visual Studio Code.
2. Go to the Extensions view by clicking on the square icon in the sidebar
or pressing Ctrl+Shift+X.
3. Search for “GitHub Pull Requests” in the search bar.
4. Click the “Install” button next to the extension provided by GitHub.
5. Once installed, open your desired GitHub repository in VS Code.
6. A new view will appear on the activity bar, showing a list of pull
requests and issues.
o This extension also supports features like in-editor commenting, PR
validation, and terminal integration.
2. Adding Files from Visual Studio Code to GitHub:
o To add files from your local project to a GitHub repository, follow these steps:
1. Make sure you have Git installed.
2. Create a GitHub account if you haven’t already.
3. Open your local project in Visual Studio Code.
4. Add a README.md file (if you don’t have anything else to add yet).
5. Click on the “Publish to GitHub” button.
6. Choose whether you want your repo to be private or public.
7. Select the files you want to include in the initial commit.
8. Commit your changes and push them to GitHub using the Git
commands:
▪ git init
▪ git add .
▪ git commit -m "Initial commit"
▪ git remote add origin <repository URL>
▪ git push -u origin master (replace origin with the
name of your remote repository and master with the
branch name)2.

Video Reference for Using Git & GitHub in VSCode: Stage, Commit, and Push

https://www.youtube.com/watch?v=z5jZ9lrSpqk

Nidhi Grover Raheja | LINKEDIN PROFILE: www.linkedin.com/in/nidhi-grover-raheja-904211138


PYTHON & MACHINE LEARNING TRAINING SESSION-1 INSTALLATIONS

Using Git & GitHub in PyCharm IDE: Stage, Commit, and Push
Install GitHub Pull Requests and Issues extension in PyCharm IDE. Also how to add files from
PyCharm to GitHub.

1. Installing the GitHub Pull Requests and Issues Extension in PyCharm:


o PyCharm allows you to work with Git projects hosted on GitHub directly from
the IDE. To install the GitHub Pull Requests extension, follow these steps:
▪ Open your project in PyCharm.
▪ Go to Git | GitHub | Create Pull Request.
▪ The “Pull Requests” tool window will open with a pull request draft.
▪ Specify the base repository (where you want to apply your changes)
and the head repository (with the changes you want to add).
▪ Provide a title and optional description for your pull request.
▪ Review the changes in the Files tab and commits in the Commits tab.
▪ Optionally, add reviewers, assignees, or labels.
▪ Click Create Pull Request. You can also save it as a draft if you’re
not ready to push it yet.
o To manage incoming pull requests, go to Git | GitHub | View Pull Requests.
Use the tool window to filter requests and jump to a pull request on GitHub.
2. Adding Files from PyCharm to GitHub:
o First, ensure your project is under Git version control:
▪ Open your project.
▪ Press Alt+0 to open the VCS Operations Popup.
▪ Select Enable Version Control Integration and choose Git.
o To add files to your local Git repository:
▪ Expand the Unversioned Files node in the Commit tool window.
▪ Select the files you want to add and press Ctrl+Alt+A or choose Add
to VCS from the context menu.
▪ Alternatively, use the Project tool window to select files and add them
to Git.
o To push your changes to GitHub:
▪ Open the terminal option at the bottom left.
▪ Execute the following commands:
▪ git add .
▪ git commit -m "Your commit message"
▪ git push origin <branch_name>
▪ Replace <branch_name> with the actual branch name.

Video Reference for Using Git & GitHub in PyCharm IDE: Stage, Commit, and Push

https://www.youtube.com/watch?v=8ZEssR8VTKo

Nidhi Grover Raheja |LINKEDIN PROFILE: www.linkedin.com/in/nidhi-grover-raheja-904211138

You might also like