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

New Isssue is here #10275

Open
Ajeet2007 opened this issue Oct 16, 2022 · 4 comments
Open

New Isssue is here #10275

Ajeet2007 opened this issue Oct 16, 2022 · 4 comments

Comments

@Ajeet2007
Copy link

first working with pull request . i find it good for my start. So will you please assign me this issue. Also want to participate in hactoberfest
so please

@ZohaiAli
Copy link

  1. Fork the repository
    Fork the repository by clicking the fork button on the top of the page. This will create an instance of that entire repository in your account.

fork-1
2. Clone the repository
Once the repository is in your account, clone it to your machine to work with it locally.

To clone, click on the clone button and copy the link.

clone1
Open the terminal and run the following command. It will clone the repository locally.

$ git clone [HTTPS ADDRESS]
clone2
Now we have set up a copy of the master branch from the main online project repository.

We need to go to that cloned directory by running this command:

$ cd [NAME OF REPOSITORY]
clone3
3. Create a branch
It’s good practice to create a new branch when working with repositories, whether it’s a small project or contributing to a group's work.

Branch name should be short and it should reflect the work we’re doing.

Now create a branch using the git checkout command:

$ git checkout -b [Branch Name]
branch1
4. Make changes and commit them
Make essential changes to the project and save it.

Then execute git status , and you’ll see the changes.

status
Add those changes to the branch you just created using the git add command:

$ git add .
add1
Now commit those changes using the git commit command:

$ git commit -m "Adding an article to week 02 of articles of the week"
commit
5. Push changes to GitHub
In order to push the changes to GitHub, we need to identify the remote’s name.

$ git remote
remote
For this repository the remote’s name is “origin”.

After identifying the remote’s name we can safely push those changes to GitHub.

git push origin [Branch Name]
branch2
6. Create pull request
Go to your repository on GitHub and you’ll see a button “Compare & pull request” and click it.

compare
Please provide necessary details on what you’ve done (You can reference issues using “#”). Now submit the pull request.

Congratulations! You've made your first pull request.

pullRequest-1
If your pull request is accepted you’ll receive an email.

  1. Sync your forked master branch
    Before submitting any pull requests to the original repository you have to sync your repository to the original one.

Even if you are not going to submit a pull request to the original repository, it’s better to sync with the original repository as some additional features and bug fixes may have been done since you forked the original repository.

Follow these steps to update/sync those changes to your master branch:

First, check which branch you are in.
$ git branch
branch4
It’ll list all branches and indicates the current or active branch in green.

  1. Switch to the master branch.

$ git checkout master
master9
3. Add the original repository as an upstream repository.

In order to pull the changes from the original repository into your forked version, you need to add the original Git repository as an upstream repository.

$ git remote add upstream [HTTPS]
Here, [HTTPS] is the URL that you have to copy from the owner’s repository.

owner-repo
remote-add
4. Fetch the repository.

Fetch all of the changes from the original repository. Commits to the original repository will be stored in a local branch called upstream/master.

$ git fetch upstream
fetch
5. Merge it.

Merge the changes from the upstream/master into your local master branch. This will bring your fork’s master branch into sync with the upstream repository without losing your local changes.

$ git merge upstream/master
6. Push changes to GitHub

At this point your local branch is synced to the original repository’s master branch. If you want to update the GitHub repository, you need to push your changes.

$ git push origin master
NOTE: After syncing your forked master branch you can remove that remote if you want to. But you’ll need to update/sync your repository in future too, so it's best practice to keep it.

remote-dlt
$ git remote rm [Remote Name]
8. Delete the unnecessary branch
Branches are created for a special purpose. Once that purpose is accomplished, those branches aren’t necessary, so you can delete them.

$ git branch -d [Branch Name]
delete
You can delete the version of it on GitHub, too.

git push origin --delete [Branch Name]

@Naseerj
Copy link

Naseerj commented Oct 17, 2022

i will love to work on this if someone is not working on it

@priyankasaini69
Copy link

Hola!
please add hacktoberfest tag

@harsh0628
Copy link

Please assign me

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

No branches or pull requests

5 participants