#ModernJava contribute problems
1 messages ยท Page 1 of 1 (latest)
Here is an AI assisted attempt to answer your question ๐ค. Maybe it helps! In any case, a human is on the way ๐. To continue talking to the AI, you can use </chatgpt:1108714622413963314>.
It depends on the project's workflow and the specific guidelines set by the maintainers. In some projects, maintainers may assign issues to contributors, while in others, contributors can start working on issues immediately without being assigned.
To ensure a smooth contribution process, it is recommended to follow these steps:
-
Create an issue: Clearly describe the problem or feature you want to address in the issue. Provide as much information as possible to help others understand the problem and potential solutions.
-
Wait for feedback: Once you have created an issue, it is a good idea to wait for feedback from the project maintainers or other contributors. They may provide additional insights, suggestions, or guidance on how to approach the problem.
-
Clarify expectations: If there is no response within a reasonable time frame (usually a few days), you can politely ask for clarification on whether you should start working on the issue or if someone will assign it to you.
-
Get assigned (if required): If maintainers assign issues to contributors, they will likely assign it to you once they review your proposal or express interest in working on it.
-
Start working: Once assigned or given permission by maintainers, you can start working on the issue. Follow any guidelines provided by the project (e.g., coding style, testing requirements) and make sure to communicate your progress regularly.
Remember that each project may have its own unique contribution process, so it's always best to check their documentation or reach out to maintainers for specific instructions.
start immediately, create a PR once it's done
do i change the code in develop branch?
sry im kinda new to these contributing things
i'd recommend creating your own branch. if things go south while developing, can always delete the branch & start over, opposed to reverting to a commit
but it really depends on the management of the project
The repository has two main branches:
master, a stable branch mostly used for releases that receives changes only occasionally
develop, the branch where the active development takes place; receives changes frequently
Your work will be based off the develop branch.To incorporate new commits from develop into your feature branch, use git pull --rebase or equivalent GUI action. We strongly prefer having linear history, and PRs with merge commits will have to be squashed before the merge, which results in losing all valuable commit history.
After your first contribution, you will be invited to the contributor team, and you will be able to work on the project directly, without a fork.
In that case, create a branch like this feature/name-of-your-feature, and push directly to the repo!
you can always merge your branch into dev once done, the create a PR from that
the master branch is what the team should be merging into. you would only work on the dev branch
however, you can branch off of the dev branch to do your development
its just like 1 code of change
once you're done, you can merge your changes into dev branch & create a PR for it
so then just do it on the dev branch
alr
and uhh one more question
how do i start 
do i git clone the repo?
not really fimiliar with git yet
well yeah, you'll need a clone of the repo to start
otherwise you wont have a copy/clone of the repo to work with
alr so i git clone the repo first gotcha one sec
sounds like you should be asking about git, rather than contributing
do a bit of studies on how git works, can even look into topics about contributing to open source
yea kinda
well i got the repo down
and then i change the things i needa change and then git commit and push?
pushing your commits wont work immediately. if it did, anyone could modify the active codebase in any way, which can be malicious
makes sense
instead, the management of the codebase should decide when to "pull" the changes
thats why Pull Requests exist
you create a request for management to pull your changes
they can accept or decline
im done with the changes, so i commit and then submit a pr?
yes
should i git reset --hard or --soft
The choice between git reset --hard and git reset --soft depends on what you want to achieve.
-
git reset --hard: This option will discard all changes and move the branch pointer to the specified commit. It will remove all commits and changes made after the specified commit. Use this option if you want to completely remove all changes and start fresh from a specific commit. -
git reset --soft: This option will move the branch pointer to the specified commit, but keep all changes as uncommitted. It allows you to "undo" commits while keeping the changes in your working directory. Use this option if you want to undo commits but keep your changes for further modifications or recommitting.
Consider your specific situation and decide which option aligns with your desired outcome.
ty gippidy
Yes, you need to push your changes to the remote repository before you can submit a pull request. When you push your changes, they will be visible in the remote repository, and then you can create a pull request to propose those changes for merging into the main branch.
emote: Permission to Together-Java/ModernJava.git denied to aln-chg.
fatal: unable to access 'https://github.com/Together-Java/ModernJava/': The requested URL returned error: 403
This error message indicates that you do not have the necessary permissions to push the commit to the remote repository. There could be a few reasons for this:
-
Incorrect credentials: Double-check that you are using the correct username and password or access token for your GitHub account. Make sure there are no typos or mistakes in your credentials.
-
Insufficient access rights: Ensure that you have the appropriate permissions granted by the repository owner or administrator. If you are not a collaborator or member of the organization, you may need to request access or be added as a contributor.
-
Two-factor authentication (2FA) enabled: If you have enabled 2FA on your GitHub account, you will need to generate and use a personal access token instead of your regular password when pushing commits. Generate a new token with appropriate permissions and use it as your password during authentication.
To resolve this issue, try the following steps:
-
Verify your credentials: Double-check that you are using the correct username/password or personal access token.
-
Check repository permissions: Ensure that you have been granted write access to the repository by its owner.
-
Regenerate personal access token (if applicable): If you have 2FA enabled, generate a new personal access token with appropriate permissions and use it instead of your regular password.
-
Contact repository owner/administrator: If none of the above steps work, reach out to the repository owner or administrator and request assistance with granting you proper permissions.
By resolving any permission-related issues, you should be able to successfully push your commit to the remote repository on GitHub.
what's your issue ?
top right button link expired one
wdym
yes ?
oh wait
what's the problem ?
yea so when i try to push the commit to the develop branch
the terminal showed this
one sec
remote: Permission to Together-Java/ModernJava.git denied to aln-chg.
fatal: unable to access 'https://github.com/Together-Java/ModernJava/': The requested URL returned error: 403
well you don't push to develop
are you working in a fork?
no, uh oh i think i mistakened what the contrubuting guideline meant
yes i didnt
yes
what are they ?
your own fork that you work on?
it's not a fork
there is one main branch (usually called master, develop, main, here develop)
mhm
it's not a copy, it starts with the same commits but at some point diverged
alright
i mistakned the main branch as master
yes
do you know what push and pull are ?
right
pull im not sure
(pull is basically fetch + merge/fast forward)
dang i gotta up my git knowledge by a lot
yes
this branch is usually protected
yes
right
hence why this
ohhh
i think i get it now, i need to create my own branch, push the commit and then submit a pr?
instead, you create your personal branch and work on it
then you push your branch
and now you will have the develop branch and your personal branch with the new features
so you create a PR from your branch to develop
alrightyy now i get it
and a mod will review and approve this PR
and then merge it
(and optionnally delete your branch)
so i did do a commit on develop branch do i just delete it?
your commit will directly be on the new branch
then you just push it
and create a PR
then you check in the changed files and commit list that everything is correct
and then you wait for the review
git branch MyBranch
yes
this ?
like just literally that?
yes
oh damn alr
and if git doesn't like /, use another character
it's not a problem, it's just a temporary branch
branch names that you just use for a PR are not important
what's more important
is that in your commit message
you start your message with [feature/your-feature] The actual commit message.
so people who will read the history will have an easier time to understand
and also do that in the name of the PR
for the same reason
...you are supposed to put the name of your feature
mb
this message was me double checking i have to literally type out feature/your feature
like literally
sry for causing this much issues
ok i chagned the branch name
oh k
or improvement
ye ebcause the button on top right has an expired link in it
and i wanna fix it by changing the link
would it be named anything different?
well
it's feature/ because it's a feature
but at the end, the name of the branch isn't that important since it's gonna be deleted anyway
i think i got it
what's more important are the messages of the commits and the name of the pr
ok i will make sure they are clear
i finished my change(since its only changing the link)
2.git commit -m "fixed the button on top right where the discord invite link is expired
3.git push origin bug/fixing-expired-link```