#ModernJava contribute problems

1 messages ยท Page 1 of 1 (latest)

sinful gardenBOT
#

<@&987246964494204979> please have a look, thanks.

#

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:

  1. 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.

  2. 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.

  3. 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.

  4. 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.

  5. 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.

modest vine
#

start immediately, create a PR once it's done

hybrid hawk
#

do i change the code in develop branch?

#

sry im kinda new to these contributing things

modest vine
#

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

hybrid hawk
#

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!

modest vine
#

you can always merge your branch into dev once done, the create a PR from that

hybrid hawk
#

its from the contributing doc

#

cant quite understand tbh

modest vine
#

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

hybrid hawk
#

its just like 1 code of change

modest vine
#

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

hybrid hawk
#

alr

#

and uhh one more question

#

how do i start LUL

#

do i git clone the repo?

#

not really fimiliar with git yet

modest vine
#

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

hybrid hawk
#

alr so i git clone the repo first gotcha one sec

modest vine
#

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

hybrid hawk
#

yea kinda

#

well i got the repo down

#

and then i change the things i needa change and then git commit and push?

modest vine
#

pushing your commits wont work immediately. if it did, anyone could modify the active codebase in any way, which can be malicious

hybrid hawk
#

makes sense

modest vine
#

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

hybrid hawk
#

ohhhhh

#

ok

hybrid hawk
modest vine
#

yes

hybrid hawk
#

thx

#

appreciate the help

hybrid hawk
#

how do i revert a git commit

#

or more so delete the commit i made

hybrid hawk
sinful gardenBOT
#

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.

hybrid hawk
#

ty gippidy

sinful gardenBOT
#

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:

  1. 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.

  2. 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.

  3. 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:

  1. Verify your credentials: Double-check that you are using the correct username/password or personal access token.

  2. Check repository permissions: Ensure that you have been granted write access to the repository by its owner.

  3. 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.

  4. 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.

timid temple
#

what's your issue ?

hybrid hawk
#

top right button link expired one

timid temple
#

wdym

hybrid hawk
#

this one

timid temple
#

yes ?

hybrid hawk
#

oh wait

timid temple
#

what's the problem ?

hybrid hawk
#

yea so when i try to push the commit to the develop branch

#

the terminal showed this

#

one sec

timid temple
#

well you don't push to develop

hybrid hawk
#

๐Ÿคฆ mb

#

not familiar with these

#

can you please guide me?

timid temple
#

are you working in a fork?

hybrid hawk
#

no, uh oh i think i mistakened what the contrubuting guideline meant

timid temple
#

well

#

i assume you don't

hybrid hawk
#

yes i didnt

timid temple
#

right so

#

do you know what branches are ?

hybrid hawk
#

yes

timid temple
#

what are they ?

hybrid hawk
#

your own fork that you work on?

timid temple
#

it's not a fork

hybrid hawk
#

and when u done u submit a pr to merge to master

#

damn

timid temple
#

but similar yea

#

it's like a parallel universe

hybrid hawk
#

yea

#

its a "copy" of the same thing but at a different place

timid temple
#

there is one main branch (usually called master, develop, main, here develop)

hybrid hawk
#

mhm

timid temple
hybrid hawk
#

alright

hybrid hawk
timid temple
#

it's called a branch

#

because the whole thing looks like a tree

hybrid hawk
#

yes

timid temple
#

do you know what push and pull are ?

hybrid hawk
#

yes

#

push is to push the commit to the remote repo

timid temple
#

right

hybrid hawk
#

pull im not sure

timid temple
#

(pull is basically fetch + merge/fast forward)

hybrid hawk
#

dang i gotta up my git knowledge by a lot

timid temple
#

so you have the main branch

#

here develop

hybrid hawk
#

yes

timid temple
#

this branch is usually protected

hybrid hawk
#

yes

timid temple
#

because the program depends of this branch

#

so you can't just do anything to it

hybrid hawk
#

right

hybrid hawk
#

ohhh

#

i think i get it now, i need to create my own branch, push the commit and then submit a pr?

timid temple
#

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

hybrid hawk
#

alrightyy now i get it

timid temple
#

and a mod will review and approve this PR

#

and then merge it

#

(and optionnally delete your branch)

hybrid hawk
#

so i did do a commit on develop branch do i just delete it?

timid temple
#

no need

#

create a new branch

hybrid hawk
#

oh k

#

alr one sec lemme create one

timid temple
#

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

hybrid hawk
#

sry but how do i create a new branch

#

i mistakned it as fork

timid temple
#

git branch MyBranch

hybrid hawk
#

thx

#

in this case guidelines says feature/your-feature

#

so what should i name it

timid temple
#

yes

hybrid hawk
#

like just literally that?

timid temple
#

yes

hybrid hawk
#

oh damn alr

timid temple
#

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

hybrid hawk
#

lemme double check with u i literally type git branch feature/your-feature

#

aight

timid temple
#

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

hybrid hawk
#

alright

#

im in my branch now

#

and then i do my changes and stuff

timid temple
#

...you are supposed to put the name of your feature

hybrid hawk
#

mb

hybrid hawk
#

like literally

#

sry for causing this much issues

#

ok i chagned the branch name

timid temple
#

it's literally feature

#

feature/fixing-expired-link

hybrid hawk
#

oh k

timid temple
#

and

#

doesn't sound like a feature to me

#

more like a bug ๐Ÿค”

hybrid hawk
#

well

#

yeah it is a bug

timid temple
#

or improvement

hybrid hawk
#

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?

timid temple
#

bug/fixing-expired-link

#

๐Ÿค”

hybrid hawk
#

ahh

#

makes sense

#

so the naming isnt that strict

timid temple
#

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

hybrid hawk
#

i think i got it

timid temple
#

what's more important are the messages of the commits and the name of the pr

hybrid hawk
hybrid hawk
#

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```