](https://github.com/Emmanuelbinen) |
================================================
FILE: .github/FUNDING.yml
================================================
# These are supported funding model platforms
github: [firstcontributions]
open_collective: [firstcontributions]
ko_fi: # Replace with a single Ko-fi username
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
================================================
FILE: .github/ISSUE_TEMPLATE/issue-template.md
================================================
---
name: Suggest changes
about: If you want to report a bug or suggest improvements, please open an issue.
title: ''
labels: discussion, question
assignees: Roshanjossey
---
🐞 **Problem**
🎯 **Goal**
💡 **Possible solutions**
📋 **Steps to solve the problem**
* Comment below about what you've started working on.
* Add, commit, push your changes.
* Submit a pull request and add this in comments - `Addresses #
`;
const nextSteps = `# Next steps \n - Continue contributing: If you're looking for projects to contribute to, checkout our [
#### If you don't have git on your machine, [install it](https://docs.github.com/en/get-started/quickstart/set-up-git).
## Fork this repository
Fork this repository by clicking on the fork button on the top of this page.
This will create a copy of this repository in your account.
## Clone the repository
Now clone the forked repository to your machine. Go to your GitHub account, open the forked repository, click on the code button, then on SSH tab and then click the _copy url to clipboard_ icon.
Open a terminal and run the following git command:
```bash
git clone "url you just copied"
```
where "url you just copied" (without the quotation marks) is the url to this repository (your fork of this project). See the previous steps to obtain the url.
For example:
```bash
git clone git@github.com:this-is-you/first-contributions.git
```
where `this-is-you` is your GitHub username. Here you're copying the contents of the first-contributions repository on GitHub to your computer.
## Create a branch
Change to the repository directory on your computer (if you are not already there):
```bash
cd first-contributions
```
Now create a branch using the `git switch` command:
```bash
git switch -c your-new-branch-name
```
For example:
```bash
git switch -c add-alonzo-church
```
If you go to the project directory and execute the command `git status`, you'll see there are changes.
Add those changes to the branch you just created using the `git add` command:
```bash
git add Contributors.md
```
Now commit those changes using the `git commit` command:
```bash
git commit -m "Add your-name to Contributors list"
```
replacing `your-name` with your name.
## Push changes to GitHub
Push your changes using the command `git push`:
```bash
git push -u origin your-branch-name
```
replacing `your-branch-name` with the name of the branch you created earlier.
remote: Support for password authentication was removed on August 13, 2021. Please use a personal access token instead. remote: Please see https://github.blog/2020-12-15-token-authentication-requirements-for-git-operations/ for more information. fatal: Authentication failed for 'https://github.com/<your-username>/first-contributions.git/'Go to [GitHub's tutorial](https://docs.github.com/en/authentication/connecting-to-github-with-ssh/adding-a-new-ssh-key-to-your-github-account) on generating and configuring an SSH key to your account. Also, you might want to run 'git remote -v' to check your remote address. If it looks anything like this:
origin https://github.com/your-username/your_repo.git (fetch) origin https://github.com/your-username/your_repo.git (push)change it using this command: ```bash git remote set-url origin git@github.com:your-username/your_repo.git ``` Otherwise you'll still get prompted for username and password and get authentication error.
Now submit the pull request.
Soon I'll be merging all your changes into the main branch of this project. You will get a notification email once the changes have been merged.
## Where to go from here?
Congrats! You just completed the standard _fork -> clone -> edit -> pull request_ workflow that you'll often encounter as a contributor!
Celebrate your contribution and share it with your friends and followers by going to [web app](https://firstcontributions.github.io/#social-share).
If you'd like more practice, checkout [code contributions](https://github.com/roshanjossey/code-contributions).
Now let's get you started with contributing to other projects. We've compiled a list of projects with easy issues you can get started on. Check out [the list of projects in the web app](https://firstcontributions.github.io/#project-list).
### [Additional material](docs/additional-material/git_workflow_scenarios/additional-material.md)
## Tutorials Using Other Tools
|
To keep your two repos up-to-date with my public repo, we first have to fetch and merge the public repo with your local machine's repo.
Our second move will be to push your local repo to your GitHub fork. As you've seen earlier, it's only from your fork that you can ask for a "pull request". So your GitHub fork is the last repo to be updated.
Now, let's see how to do it:
First, you must be on your main branch. To know which branch you are on, check the first line of:
```
git status
```
if you are not already on main:
```
git checkout main
```
Then you should add my public repo to your git with `add upstream remote-url`:
```
git remote add upstream https://github.com/firstcontributions/first-contributions.git
```
This is a way of telling git that another version of this project exists in the specified url and we're calling it `upstream`. Once your git has a name let's fetch the latest version of the public repository:
```
git fetch upstream
```
You've just fetched the latest version of my fork (`upstream` remote). Now, you need to merge the public repository into your main branch.
```
git rebase upstream/main
```
Here you're merging the public repository with your main branch. Your local machine's main branch is now up-to-date. Lastly, if you push your main branch to your fork, your GitHub fork will also have the changes:
```
git push origin main
```
Notice here you're pushing to the remote named `origin`.
If you want to fetch and merge the latest changes of my fork (`upstream` remote) to your local branch at same time then you can directly go for:
```
git pull upstream main
```
So by now or at this point, all your repositories are up-to-date. Well done! You should do this, every time your GitHub repo tells you that you are a few commits behind.
================================================
FILE: docs/additional-material/git_workflow_scenarios/moving-a-commit-to-a-different-branch.md
================================================
# Moving a commit to a different branch
What if you commit a change, and then realize that you committed to a different branch?
How can you change that? This is what this tutorial covers.
## Moving the latest commits to an existing branch
To do this, type:
```git reset HEAD~ --soft``` - Undoes the last commit, but leaves the changes available.
```git stash``` - Records the state of the directory.
```git checkout name-of-the-correct-branch``` - Switches to another branch.
```git stash pop``` - Removes latest stashed state.
```git add .``` - Or try adding individual files.
```git commit -m "your message here"``` - Saves and Commits the changes.
Now your changes are on the correct branch
### Moving the latest commits to a new Branch
To do this, type:
```git branch newbranch``` - Creates a new Branch. Saving all the Commits.
```git reset --hard HEAD~#``` - Move master back by # commits. Remember, these commits will be gone from master
```git checkout newbranch``` - Goes to the branch you created. It will have all the commits.
Remember: Any changes not committed will be LOST.
================================================
FILE: docs/additional-material/git_workflow_scenarios/rebase-vs-merge.md
================================================
# Rebase vs Merge
When contributing to open-source projects, it’s important to understand how to integrate your changes cleanly.
Two common ways to bring updates from one branch into another are **merge** and **rebase**.
## What Is Rebase?
**Rebasing** replays your commits from one branch on top of another — effectively moving your work to start from the tip of another branch.
This creates a **linear and clean commit history** without merge commits.
### Example
```bash
# Switch to your feature branch
git switch feature_branch
# Rebase your feature branch on top of main
git rebase main
```
Alternatively,
```bash
git checkout
Каб захаваць вашыя два сховішчы ў актуальным стане з маім адкрытым сховішчам, мы спачатку павінны здабыць і аб'яднаць агульнае сховішча з рэпазітарам вашай лакальнай машыны.
Наш другі крок - перанесці ваша мясцовае сховішча ў відэлец GitHub. Як вы ўжо бачылі раней, толькі "з відэльцам" вы можаце папрасіць "pull request". Такім чынам, відэлец GitHub - апошняе сховішча, якое трэба абнавіць.
Зараз давайце паглядзім, як гэта зрабіць:
Па-першае, вы павінны быць на сваім вядучым аддзяленні. Каб даведацца, на якой філіяле вы знаходзіцеся, праверце першы радок:
```
git status
```
калі вы яшчэ не на майстры:
```
git checkout master
```
Затым вы павінны дадаць маё агульнадаступнае сховішча ў свой git з `add addstream stream-url`:
```
git remote add upstream https://github.com/firstcontributions/first-contributions.git
```
Гэта спосаб сказаць Git, што іншая версія гэтага праекта існуе ў паказаным URL-адресе, і мы называем яго "вышэй". Пасля таго, як ваш git мае імя, давайце пазнаём апошнюю версію грамадскага сховішча:
```
git fetch upstream
```
Вы толькі што атрымалі апошнюю версію майго відэльца (`upstream` remote). Зараз вам трэба аб'яднаць агульнадаступнае сховішча ў ваша галоўнае аддзяленне.
```
git rebase upstream/master
```
Тут вы аб'яднаеце грамадскае сховішча з вашай галоўнай галіной. Галоўнае аддзяленне вашай мясцовай машыны зараз актуальнае. І, нарэшце, калі вы націснеце галоўную галінку на відэлец, ваша відэлец GitHub таксама будзе змяняць:
```
git push origin master
```
Звярніце ўвагу, вы націскаеце на remote імя `origin`.
Такім чынам, да гэтага часу альбо ў гэты момант усе вашыя сховішчы актуальныя. Добра зроблена! Вы павінны рабіць гэта кожны раз, калі ваш сховішча GitHub паведамляе вам, што вы здзяйсняеце некалькі commits.
================================================
FILE: docs/additional-material/translations/Belarusian/moving-a-commit-to-a-different-branch.by.md
================================================
# Перамяшчэнне камітаў ў іншую галінку
Што рабіць, калі вы здзяйсняеце змены, а потым разумееце, што вы здзейснілі іншую галіну?
Як вы можаце гэта змяніць? Вось што ахоплівае гэты падручнік.
## Перамяшчэнне апошніх камітаў ў існуючую галінку
Для такога перамяшчэння, набярыце:
`` `git reset HEAD ~ --soft` `` - Адмяняе апошняе commit, але пакідае даступныя змены.
`` `git stash` `` - Захоўвае стан дырэкторыі.
`` `git checkout <імя правільнай галінкі>` `` - Перамыкаецца на іншую галінку.
`` `git stash pop` `` - Вяртае апошняе захаванае стан.
`` `git add .` `` - Дадае індывідуальныя файлы.
`` `git commit -m "your message here"``` - Захоўвае і ўносіць змены.
Зараз вашы змены - у правільнай галінцы.
### Перамяшчэнне апошніх камітаў ў новую галінку
Для такога перамяшчэння, набярыце:
`` `git branch newbranch` `` - Стварае новую галінку, захоўваючы ўсе камітаў.
`` `git reset --hard HEAD ~ [n]` `` - Вяртае галінку master назад на n камітаў. Майце на ўвазе, што змены змяшчаюцца ў гэтых камітаў будуць цалкам выдалены з галінкі master.
`` `git checkout newbranch` `` - Перамыкаецца на галінку, якую вы стварылі. Гэтая галінка цяпер змяшчае ўсе commits.
Запомніце: Любыя змены, якія не былі ўключаныя ў commit, будуць цалкам страчаныя.
================================================
FILE: docs/additional-material/translations/Belarusian/removing-a-file.by.md
================================================
# Выдаленне файла з-пад GIT кантролю
Часам можа ўзнікнуць неабходнасць выдаліць файл з-пад GIT кантролю, але захаваць яго на кампутары. Гэта можа быць дасягнута з дапамогай наступнай каманды:
`` git rm <файл> --cached``
## Што ж адбылося?
GIT больш не кантралюе змены ў аддаленым файле. З пункту гледжання GIT, гэты файл адсутнічае, але калі вы паспрабуеце лакалізаваць гэты файл у файлавай сістэме, то вы ўбачыце, што ён усё яшчэ на месцы.
Звярніце ўвагу, што ў прыведзеным вышэй прыкладзе выкарыстоўваецца сцяг `--cached`. Калі мы не дадамо гэты сцяг, Git выдаліць файл не толькі з сховішча, але і з вашай файлавай сістэмы.
Калі вы здзейсніце змяненне з дапамогай `git commit -m" Remove file1.js "` і перанеслі яго ў аддаленае сховішча з дапамогай `git push origin master`, выдалены рэпазітар выдаліць файл.
## Дадатковая інфармацыя
- Калі вы хочаце выдаліць больш за адзін файл, гэта можна зрабіць, пералічыўшы ўсе файлы ў адной камандзе:
`git rm file1.js file2.js file3.js --cached`
- Вы можаце выкарыстоўваць шаблон (*) для выдалення файлаў з блізкімі імёнамі, напрыклад, калі вы хочаце выдаліць усе .txt файлы з лакальнага рэпазітара, набярыце:
`git rm * .txt --cached`
================================================
FILE: docs/additional-material/translations/Belarusian/removing-branch-from-your-repository.by.md
================================================
# Выдаленне галінкі з вашага рэпазітара
Калі вы да гэтага часу выконвалі ўрок, то наша галіна `
为了保持你的两个仓库与我的公共仓库同步,我们首先需要将公共仓库的内容拉取并与本地机器上的仓库合并。
我们的第二步是将你的本地仓库推送到你的 GitHub 分叉。如前所述,只有通过你的分叉你才能发起一个“拉取请求”。因此,你的 GitHub 分叉是最后更新的仓库。
现在,让我们看看如何做到这一点:
首先,你必须确保自己处于主分支上。要知道自己当前在哪个分支,可以检查的第一行:
```
git status
```
如果你不在主分支上,输入以下命令切换到主分支:
```
git checkout main
```
然后,你应该将我的公共仓库添加到你的 Git 仓库中,使用 `add upstream remote-url`:
```
git remote add upstream https://github.com/firstcontributions/first-contributions.git
```
这告诉 Git,指定的 URL 位置有该项目的另一个版本,并且我们将其命名为 `upstream`。一旦你的 Git 配置了上游仓库,你就可以拉取公共仓库的最新版本:
```
git fetch upstream
```
你刚刚拉取了我仓库的最新版本(`upstream` 远程仓库)。现在,你需要将公共仓库的内容合并到你的主分支中:
```
git rebase upstream/main
```
在这里,你正在将公共仓库合并到你的主分支。现在,你本地机器上的主分支已更新。最后,如果你将主分支推送到你的 GitHub 分叉,那么你的 GitHub 分叉也会更新:
```
git push origin main
```
请注意,这里你推送的是名为 `origin` 的远程仓库。
如果你想同时将我仓库的最新更改(`upstream` 远程仓库)拉取并合并到你本地的分支中,可以直接使用:
```
git pull upstream main
```
到目前为止,你的所有仓库都已更新。做得很好!每当你的 GitHub 仓库提示你比公共仓库落后几个提交时,你都应该执行这些操作。
================================================
FILE: docs/additional-material/translations/Chinese/moving-a-commit-to-a-different-branch.zh-cn.md
================================================
# 移动提交到不同的分支
假设你提交了一个更改,然后意识到你提交到了错误的分支。
你该如何更改呢?这篇教程将为你解答。
## 将最新的提交移动到现有分支
为此,请输入以下命令:
```git reset HEAD~ --soft``` - 撤销上一个提交,但保留更改。
```git stash``` - 记录当前目录的状态。
```git checkout name-of-the-correct-branch``` - 切换到正确的分支。
```git stash pop``` - 恢复最近的存储状态。
```git add .``` - 或者尝试单独添加文件。
```git commit -m "your message here"``` - 保存并提交更改。
现在你的更改已经在正确的分支上了。
### 将最新的提交移动到新分支
为此,请输入以下命令:
```git branch newbranch``` - 创建一个新分支,保存所有提交。
```git reset --hard HEAD~#``` - 将 master 分支回退 # 个提交。记住,这些提交将从 master 中消失。
```git checkout newbranch``` - 切换到你创建的新分支,所有提交都会在该分支中。
记住:任何未提交的更改将会丢失。
================================================
FILE: docs/additional-material/translations/Chinese/removing-a-file.zh-cn.md
================================================
# 从 Git 中移除文件
有时你可能想要从 Git 中移除一个文件,但不想从你的计算机中删除它。你可以使用以下命令来实现:
``git rm
ನಿಮ್ಮ ಎರಡು ರೆಪೊಸಿಟರಿಗಳನ್ನು ನನ್ನ ಸಾರ್ವಜನಿಕ ರೆಪೊಸಿಟರಿಯೊಂದಿಗೆ ನವೀಕರಿಸಲು, ಮೊದಲು ನೀವು ನನ್ನ ರೆಪೊಸಿಟರಿಯಿಂದ ನಿಮ್ಮ ಸ್ಥಳೀಯ ರೆಪೊಸಿಟರಿಗೆ `Fetch` ಮತ್ತು `Merge` ಮಾಡಬೇಕು.
ಹಿಂದಿನ ಹಂತದ ನಂತರ, ನೀವು ನಿಮ್ಮ Fork ಗೆ ಸ್ಥಳೀಯ ಬದಲಾವಣೆಗಳನ್ನು `Push` ಮಾಡಬೇಕು. ನೀವು `Pull Request` ಅನ್ನು ಕೇವಲ ನಿಮ್ಮ Fork ನಿಂದ ಮಾತ್ರ ಮಾಡಬಹುದು, ಆದ್ದರಿಂದ Fork ನವೀಕರಿಸುವುದು ಅಂತಿಮ ಹಂತ.
### ಈ ಹಂತಗಳನ್ನು ಅನುಸರಿಸಿ:
#### 1. ನಿಮ್ಮ `master` ಶಾಖೆಯಲ್ಲಿ ಇರುವುದು ಖಚಿತಪಡಿಸಿಕೊಳ್ಳಿ
ನೀವು ಯಾವ ಶಾಖೆಯಲ್ಲಿ ಇರುವಿರಿ ಎಂಬುದನ್ನು ಪರಿಶೀಲಿಸಲು:
```bash
git status
```
`master` ನಲ್ಲಿ ಇಲ್ಲದಿದ್ದರೆ, ಅದಕ್ಕೆ ಬದಲಾಯಿಸಿ:
```bash
git checkout master
```
#### 2. ನನ್ನ ರೆಪೊಸಿಟರಿಯನ್ನು `upstream` ಎಂದು ಸೇರಿಸಿ
```bash
git remote add upstream https://github.com/Roshanjossey/first-contributions
```
ಇದರಿಂದ Git ಗೆ ಈ URL ನಲ್ಲಿ ಇನ್ನೊಂದು ಆವೃತ್ತಿಯಿದೆ ಮತ್ತು ಅದನ್ನು `upstream` ಎಂದು ಕರೆಯುತ್ತೇವೆ ಎಂದು ತಿಳಿಯುತ್ತದೆ.
#### 3. `upstream` ರೆಪೊಸಿಟರಿಯಿಂದ ಬದಲಾವಣೆಗಳನ್ನು ಪಡೆಯುವುದು
```bash
git fetch upstream
```
ಇದು `upstream` ರೆಪೊಸಿಟರಿಯ ಎಲ್ಲಾ ಬದಲಾವಣೆಗಳನ್ನು ಪಡೆಯುತ್ತದೆ.
#### 4. ಬದಲಾವಣೆಗಳನ್ನು ನಿಮ್ಮ `master` ಶಾಖೆಯಲ್ಲಿ ಪರಿಷ್ಕರಿಸುವುದು
```bash
git rebase upstream/master
```
ಇದರಿಂದ ನೀವು `upstream` ನ ಬದಲಾವಣೆಗಳನ್ನು ನಿಮ್ಮ ಸ್ಥಳೀಯ `master` ಶಾಖೆಗೆ ಅನ್ವಯಿಸುತ್ತೀರಿ.
#### 5. ಬದಲಾವಣೆಗಳನ್ನು ನಿಮ್ಮ GitHub Fork ಗೆ ಅಪ್ಲೋಡ್ ಮಾಡುವುದು
```bash
git push origin master
```
ಇದು ನಿಮ್ಮ Fork (`origin`) ನಲ್ಲಿ ನಿಮ್ಮ `master` ಶಾಖೆಯನ್ನು ನವೀಕರಿಸುತ್ತದೆ.
ಈಗ, ನಿಮ್ಮ Fork ಮತ್ತು ಸ್ಥಳೀಯ ರೆಪೊಸಿಟರಿ ಅಪ್ಡೇಟ್ ಆಗಿದೆ! ನಿಮಗೆ ಶುಭವಾಗಲಿ!
ಪ್ರತಿಯೊಮ್ಮೆ ನಿಮ್ಮ GitHub Fork `commits behind` ಎಂಬ ಸಂದೇಶ ತೋರಿಸಿದಾಗ ಈ ಹಂತಗಳನ್ನು ಅನುಸರಿಸಿ.
================================================
FILE: docs/additional-material/translations/Kannada/moving-a-commit-to-a-different-branch.ka.md
================================================
# commit ಅನ್ನು ಬೇರೆ branch ಗೆ ಸ್ಥಳಾಂತರಿಸುವುದು
ನೀವು commit ಮಾಡಿದ್ದ ನಂತರ, ಅದು ತಪ್ಪಾಗಿ ಬೇರೆ branch ನಲ್ಲಿ ಆಗಿದೆ ಎಂದು ಗಮನಿಸಿದರೆ ಏನು ಮಾಡಬೇಕು?
ಈ ಟ್ಯುಟೋರಿಯಲ್ ಇದನ್ನು ಸರಿಪಡಿಸುವ ಬಗ್ಗೆ.
## ಈಗಾಗಲೇ ಅಸ್ತಿತ್ವದಲ್ಲಿರುವ branch ಗೆ commit ಸ್ಥಳಾಂತರಿಸುವುದು
ಈ ಕೆಳಗಿನ ಆಜ್ಞೆಗಳನ್ನು ಬಳಸಿ:
```bash
git reset HEAD~ --soft # ಕೊನೆಯ commit ಅನ್ನು ಹಿಂದಕ್ಕೆ ಕೊಂಡು ಬರುತ್ತದೆ, ಆದರೆ ಪರಿಷ್ಕರಣೆಗಳನ್ನು ಉಳಿಸುತ್ತದೆ.
git stash # ಪ್ರಸ್ತುತ ಸ್ಥಿತಿಯನ್ನು ಸಂಗ್ರಹಿಸುತ್ತದೆ.
git checkout name-of-the-correct-branch # ಸರಿಯಾದ branch ಗೆ ತೆರಳುತ್ತದೆ.
git stash pop # ಹಿಂದಿನ ಸ್ಥಿತಿಯನ್ನು ಪುನಃ ಪ್ರಸ್ತಾಪಿಸುತ್ತದೆ.
git add . # ಎಲ್ಲಾ ಪರಿಷ್ಕರಣೆಗಳನ್ನು stage ಮಾಡುತ್ತದೆ.
git commit -m "your message here" # commit ಮಾಡುತ್ತದೆ.
```
ಈಗ ನಿಮ್ಮ ಪರಿಷ್ಕರಣೆಗಳು ಸರಿಯಾದ branch ನಲ್ಲಿ ಇವೆ.
## ಹೊಸ branch ಗೆ commit ಸ್ಥಳಾಂತರಿಸುವುದು
```bash
git branch newbranch # ಹೊಸ branch ರಚಿಸುತ್ತದೆ.
git reset --hard HEAD~# # # ಗಿಂತ ಹಳೆಯ commit ಗಳನ್ನು ಹಿಂದಕ್ಕೆ ತೆಗೆದುಕೊಳ್ಳುತ್ತದೆ (ಈಗಿನ branch ನಿಂದ ಅಳಿಸಿಬಿಡುತ್ತದೆ!).
git checkout newbranch # ಹೊಸ branch ಗೆ ಸ್ಥಳಾಂತರವಾಗುತ್ತದೆ.
```
**ಗಮನಿಸಿ:** ಯಾವುದೇ commit ಆಗದ ಪರಿಷ್ಕರಣೆಗಳು ಇಲ್ಲವಾಗುತ್ತವೆ!
================================================
FILE: docs/additional-material/translations/Kannada/removing-a-file.ka.md
================================================
# commit ಅನ್ನು ಬೇರೆ branch ಗೆ ಸ್ಥಳಾಂತರಿಸುವುದು
ನೀವು commit ಮಾಡಿದ್ದ ನಂತರ, ಅದು ತಪ್ಪಾಗಿ ಬೇರೆ branch ನಲ್ಲಿ ಆಗಿದೆ ಎಂದು ಗಮನಿಸಿದರೆ ಏನು ಮಾಡಬೇಕು?
ಈ ಟ್ಯುಟೋರಿಯಲ್ ಇದನ್ನು ಸರಿಪಡಿಸುವ ಬಗ್ಗೆ.
## ಈಗಾಗಲೇ ಅಸ್ತಿತ್ವದಲ್ಲಿರುವ branch ಗೆ commit ಸ್ಥಳಾಂತರಿಸುವುದು
ಈ ಕೆಳಗಿನ ಆಜ್ಞೆಗಳನ್ನು ಬಳಸಿ:
```bash
git reset HEAD~ --soft # ಕೊನೆಯ commit ಅನ್ನು ಹಿಂದಕ್ಕೆ ಕೊಂಡು ಬರುತ್ತದೆ, ಆದರೆ ಪರಿಷ್ಕರಣೆಗಳನ್ನು ಉಳಿಸುತ್ತದೆ.
git stash # ಪ್ರಸ್ತುತ ಸ್ಥಿತಿಯನ್ನು ಸಂಗ್ರಹಿಸುತ್ತದೆ.
git checkout name-of-the-correct-branch # ಸರಿಯಾದ branch ಗೆ ತೆರಳುತ್ತದೆ.
git stash pop # ಹಿಂದಿನ ಸ್ಥಿತಿಯನ್ನು ಪುನಃ ಪ್ರಸ್ತಾಪಿಸುತ್ತದೆ.
git add . # ಎಲ್ಲಾ ಪರಿಷ್ಕರಣೆಗಳನ್ನು stage ಮಾಡುತ್ತದೆ.
git commit -m "your message here" # commit ಮಾಡುತ್ತದೆ.
```
ಈಗ ನಿಮ್ಮ ಪರಿಷ್ಕರಣೆಗಳು ಸರಿಯಾದ branch ನಲ್ಲಿ ಇವೆ.
## ಹೊಸ branch ಗೆ commit ಸ್ಥಳಾಂತರಿಸುವುದು
```bash
git branch newbranch # ಹೊಸ branch ರಚಿಸುತ್ತದೆ.
git reset --hard HEAD~# # # ಗಿಂತ ಹಳೆಯ commit ಗಳನ್ನು ಹಿಂದಕ್ಕೆ ತೆಗೆದುಕೊಳ್ಳುತ್ತದೆ (ಈಗಿನ branch ನಿಂದ ಅಳಿಸಿಬಿಡುತ್ತದೆ!).
git checkout newbranch # ಹೊಸ branch ಗೆ ಸ್ಥಳಾಂತರವಾಗುತ್ತದೆ.
```
**ಗಮನಿಸಿ:** ಯಾವುದೇ commit ಆಗದ ಪರಿಷ್ಕರಣೆಗಳು ಇಲ್ಲವಾಗುತ್ತವೆ!
---
# Git ನಿಂದ ಫೈಲ್ ಅನ್ನು ತೆಗೆದುಹಾಕುವುದು
ಕಾಲಕಾಲಕ್ಕೆ, Git ನಿಂದ ಫೈಲ್ ಅನ್ನು ತೆಗೆದುಹಾಕಬೇಕು, ಆದರೆ ಅದನ್ನು ನಿಮ್ಮ ಕಂಪ್ಯೂಟರ್ ನಿಂದ ಅಳಿಸಬಾರದು. ಇದನ್ನು ಈ ಕೆಳಗಿನ ಆಜ್ಞೆಯ ಮೂಲಕ ಮಾಡಬಹುದು:
```bash
git rm
여러분의 두 개의 저장소들을 제 공개 저장소의 최신 상태와 싱크상태를 유지하기 위해서는 제일 먼저여러분의 로컬머신에 위치한 저장소를 제 공개 저장소와 fetch와 merge를 해야합니다.
두번째는 여러분의 로컬 저장소를 포크된 GitHub의 저장소에 push하는 것 입니다. 이전 과정에서 봤듯이 "pull request"를 요청할 수 있는 곳은 오직 포크된 저장소에서만 가능합니다. 따라서 마지막으로 업데이트 되어야하는 저장소는 포크된 GitHub입니다.
자, 어떻게하는지 보겠습니다:
먼저 여러분은 main 브랜치에 위치해 있어야합니다. 현재 어떤 브래치에 있는지 확인합니다.:
```
git status
```
현재 main 브랜치가 아니라면 변경합니다.:
```
git checkout main
```
제 공개 저장소를 아직 여러분의 git에 추가하지 않았다면 다음 명령으로 추가합니다. `add upstream remote-url`:
```
git remote add upstream https://github.com/Roshanjossey/first-contributions
```
지정한 URL을 이용해 현재 프로젝트의 또 다른 최신 버전이 있는지 git에게 확인을 요청하는 방법입니다. 그리고 우리는 이를 `upstream` 이라고 부르기로합니다. 일단 git이 이러한 이름을 가지고 있다면 다음과 같이 공개 저장소의 최진 버전을 가지고 옵니다. :
```
git fetch upstream
```
여러분은 이제 제 포크(upstream remote)에서 최신 버전을 내려 받았습니다. 이제 공개 저장소의 변경된 내용을 여러분의 main 브랜치에 병합해야합니다.
```
git rebase upstream/main
```
여러분의 main 브랜치와 공개 저장소를 병합하고 나면 이제 여러분의 로컬머신의 main 브랜치는 최신 상태입니다. 마지막으로 여러분의 main 브랜치를 여러분의 포크에 push하게 되면 포크한 GitHub 또한 변경사항들이 반영됩니다.:
```
git push origin main
```
origin으로 명명된 리모트에 push하는 것에 주의하세요.
이제 여러분의 모든 저장소가 최신 상태를 유지하게 되었습니다.
잘 하셨습니다! GitHub 저장소에 커밋이 추가적으로 발생할 때마다 이러한 작업을 해야합니다.
================================================
FILE: docs/additional-material/translations/Korean/moving-a-commit-to-a-different-branch.ko.md
================================================
## 커밋을 다른 브랜치로 옮기기
What if you commit a change, and then realize that you committed to a different branch?
How can you change that? This is what this tutorial covers.
만일 변경사항을 반영했는데 전혀 다른 브랜치에 커밋한 사실을 알았다면 어떻게할까요?
이걸 어떻게 바로잡을 수 있을까요? 바로 이 장에서 다룰 내용입니다.
### 가장 최근 커밋들을 기존에 있는 브랜치로 이동시키기
사용예:
```git reset HEAD~ --soft``` - 마지막 커밋을 되돌립니다. 물론 수정한 내용은 그대로 남아있습니다.
```git stash``` - 현재까지 수정한 모든 작업내용들의 상태를 저장합니다.
```git checkout name-of-the-correct-branch``` - 실제 반영하고자하는 브랜치를 체크아웃합니다.
```git stash pop``` - 마지막으로 저장한(stash) 변경내역들을 현재 브랜치에 반영하고 저장한 내역에서 삭제합니다.
```git add .``` - 또는 커밋에 반영할 변경내역들을 개별적으로 추가합니다.
```git commit -m "your message here"``` - 저장하고 변경내역을 커밋합니다.
자 이제 변경사항이 올바른 브랜치에 반영되었습니다.
### 가장 최근 커밋들을 신규 브랜치를 생성하여 이동시키기
사용예:
```git branch newbranch``` - 신규 브랜치를 생성하고 모든 커밋들을 저장합니다.
```git reset --hard HEAD~#``` - master 브랜치의 #번째 커밋을 되돌립니다. 되돌린 커밋들은 master에서 완전히 삭제되므로 주의하세요.
```git checkout newbranch``` - 생성한 브랜치로 이동합니다. 모든 커밋들을 가지고 있을겁니다.
주의: 커밋하지 않은 변경사항들은 사라집니다.
================================================
FILE: docs/additional-material/translations/Korean/removing-branch-from-your-repository.ko.md
================================================
## 여러분의 저장소에서 브랜치 삭제하기
지금까지의 튜토리얼을 수행했다면, 우리의 `
Para manter seus dois repositórios atualizados com meu repositório público, o primeiro passo é dar um Fetch (buscar) e então um Merge (mesclar) do repositório público ao seu repositório local.
O segundo passo é fazer um Push do repositório local para o seu Fork no GitHub. Como vimos anteriormente, é somente a partir do seu Fork que você consegue fazer um Pull Request. Por isso, esse Fork é o último repositório a ser atualizado.
Agora, vamos ver como fazer isso:
Primeiro, você precisa estar em seu Branch principal (master). Para saber em qual Branch você está, verifique a primeira linha que aparece como resultado do seguinte comando:
```
git status
```
Se você não está no master, vá para ele:
```
git checkout master
```
Em seguida, você deve adicionar meu repositório público ao seu git com `add upstream url-remoto`:
```
git remote add upstream https://github.com/Roshanjossey/first-contributions
```
Esta é uma forma de dizer ao Git que existe uma outra versão deste projeto na URL especificada e estamos chamando-a de `upstream`. Agora busque a nova versão do meu repositório:
```
git fetch upstream
```
Aqui você está buscando todas as mudanças no meu Fork (o remoto `upstream`). Agora, você precisa mesclá-lo ao repositório público no seu Branch principal.
```
git rebase upstream/master
```
Aqui você está aplicando todas as mudanças que buscou ao seu Branch principal (master). Seu repositório local agora está atualizado. Por último, se você fizer um Push do seu Branch master para o seu Fork, seu GitHub também terá as alterações:
```
git push origin master
```
Note que aqui você está fazendo um Push para o repositório remoto chamado `origin`.
Agora, todos os seus repositórios estão atualizados. Bom trabalho! Você deve seguir esses passos sempre que seu repositório no GitHub avisar que está alguns Commits atrás do meu repositório.
================================================
FILE: docs/additional-material/translations/Portugues/moving-a-commit-to-a-different-branch.pt_br.md
================================================
# Movendo um commit para outra branch
E se apenas depois de ter realizado o commit de uma alteração, vocẽ perceber que fez esse commit na branch errada?
Como você poderia corrigir isso? É sobre isso que este tutorial se trata.
## Movendo os últimos commits para uma branch existente
Para fazer isso, digite:
```git reset HEAD~ --soft``` - Desfaz o último commit, mas mantém as alterações disponíveis.
```git stash``` - Grava o estado do diretório.
```git checkout name-of-the-correct-branch``` - Alterna para a outra branch.
```git stash pop``` - Recupera o último estado salvo.
```git add .``` - Ou tente adicionar arquivos individualmente.
```git commit -m "your message here"``` - Faça o commit das alterações.
Agora suas alterações estão na branch correta
### Movendo o último commit para uma branch nova
Para fazer isso, digite:
```git branch newbranch``` - Cria uma nova branch, mantendo todos os commits.
```git reset --hard HEAD~#``` - Retrocede a branch uma quantidade # de commits. Atenção, estes commits serão removidos da branch.
```git checkout newbranch``` - Vá para a nova branch que você criou, ela possuíra todos os commits.
Lembre-se: Qualquer alteração não comitada será PERDIDA.
================================================
FILE: docs/additional-material/translations/Portugues/removing-a-file.pt_br.md
================================================
# Removendo um arquivo do Git
Às vezes, você pode querer remover um arquivo do Git, mas não excluí-lo do seu computador. Você pode fazer isso usando o seguinte comando:
``git rm