The guides are written for the github service. You need to log in to your account or sign up.
All commands in these guides are entered in the terminal.
Make a fork (copy) of the desired project. Go to your account and go to the just created fork.
Clone the fork (copy) of the project from step 1 to your computer.
git clone firstname.lastname@example.org:maxdzyubak/vite.git
Configure the git config locally (local). It must be repeated for each project:
git config --local user.name maxdzyubak
git config --local user.email email@example.com
Or global. Set up once for all projects
git config --global user.name maxdzyubak
git config --global user.email firstname.lastname@example.org
We make a pointer to the original upstream repository from which we made the fork. This is needed to download the latest code updates from the original repository. (Checking upstream:
git remote -v).
git remote add upstream https://github.com/vitejs/vite.git
Create a new branch and go straight to it. Make all changes there. This is considered good practice
git switch -c new_branch
You can check the status of changes made with the command
Add the changes to staged. Git starts tracking changes to the file(s)
git add README.md
Make a commit with the changes. If there is an issue number, the best way to commit is to write it like this: [#123] fix bug. If you just put a grid without parentheses, it will ignore it in the git rebase
git commit -m 'Update README.md'
Check the commit made
Push the changes made to the outside world, because for now they are only on our local computer, indicating the created branch
git push origin new_branch
Create a pull request by clicking on the green button labeled Compare & pull request either in the original repository from which you made the fork, or locally in our github account.
git-clone - Clone a repository into a new directory
Customizing Git - Git Configuration
git-remote - Manage set of tracked repositories
Git Branching - Basic Branching and Merging
git-status - Show the working tree status
git-add - Add file contents to the index
git-commit - Record changes to the repository
git-log - Show commit logs
git-push - Update remote refs along with associated objects
git-request-pull - Generates a summary of pending changes