ohmybash / oh-my-bash

A delightful community-driven framework for managing your bash configuration, and an auto-update tool so that makes it easy to keep up with the latest updates from the community.
https://ohmybash.github.io
MIT License
5.55k stars 626 forks source link

aliases/package-manager: Add nala aliases #463

Closed GR3YH4TT3R93 closed 11 months ago

GR3YH4TT3R93 commented 11 months ago

Added Nala aliases, reflected changes in README.md, added detailed descriptions for package managers to README.md


Continued from PR #460 (which was unexpectedly closed)

GR3YH4TT3R93 commented 11 months ago

Did I not mess up the other one? I thought I'd messed up while trying to merge upstream changes to my repo and didn't know how to recover 😓

akinomyoga commented 11 months ago

Did I not mess up the other one? I thought I'd messed up while trying to merge upstream changes to my repo and didn't know how to recover 😓

This is the behavior of GitHub. When the PR branch becomes even with the target branch (or behind the target branch), GitHub closes the PR. To reopen the original PR, one first needs to force-push to the PR branch (in this case, master of git@github.com:GR3YH4TT3R93/oh-my-bash.git) some of the last-recorded commits in GitHub. Then, the "reopen" button at the bottom of the page (#460) becomes available.

For the present case, you have already opened an independent PR, #463, so you do not have to bother doing it (It will actually mess up things more because the PR branches of #460 and #463 are shared).

akinomyoga commented 11 months ago

Another advice would be that you shouldn't use master branch as a PR branch. It is specified in CONTRIBUTING.md:

Getting started

You should be familiar with the basics of contributing on GitHub and have a fork properly set up.

You MUST always create PRs with a dedicated branch based on the latest upstream tree.

[...]

If the branch name is the same as an existing one in the upstream repository, the manipulations of branches from both repositories (ohmybash/oh-my-bash and <PR submitter>/oh-my-bash) in a local repository become troublesome (i.e., one needs to always specify the full name of each branch for every operation, push/pull/etc). It will also induce mistakes.

GR3YH4TT3R93 commented 11 months ago

I'm sorry... This is literally my very first collaborative project (and one of my first projects in general) so I REALLY appreciate the patience and advice!

Tbh I understand the concept of branches but not specifically how to implement them... If you could give me an eli5, that would be greatly appreciated or better yet, if you've got a good video that visually walks through how it should be done that'd be amazing!

I'm currently using WildLearner and freecodecamp but it still ain't clicking...

akinomyoga commented 11 months ago

I see.

One line answer to your question would be using git checkout -b <branch-name> to create a new branch at the current HEAD, but I'm not sure if that explains everything you would like to understand. I'm sorry that I wouldn't have an idea for good and concise documentation or videos for learning the branches and other Git manipulations. If you are fine with a full book instead of compact explanations, I felt the following online book explains the basic ideas and specific implementations by Git very well:

I also had a hard time when I first learned the concepts of Git (It's been already about ten years). I couldn't find clear and easy-to-understand pages at least at that time. I referenced many pages and documents and also experimented with the commands of Git by trial and error. Many explanations in the wild at that time did not seem to explain the behavior in a well-defined way so that it is clear what happens when I change the command line slightly or when I combine the commands. I only noticed the above online book after I was satisfied with my understanding of Git.

akinomyoga commented 11 months ago

I assume you have already configured the remote repository in your local repository:

$ git remote add origin git@github.com:GR3YH4TT3R93/oh-my-bash.git
$ git remote add upstream git@github.com:ohmybash/oh-my-bash.git
$ ... etc.

To create a PR based on a new branch, the basic flow would look the following (although it depends on the situation):

$ git checkout -b add-nala-aliases
$ git add ...
$ git commit ...
$ git push -u origin add-nala-aliases

Then go to GitHub and create a PR based on the branch add-nala-aliases.

GR3YH4TT3R93 commented 11 months ago

Holy crap thank you!

But sadly you give me too much credit, I hadn't set the upstream... 😅

Should I do the second part about creating another branch named add-nala-aliases or should I leave the rest up to you for now and just use this as a reference for any future projects?

I've added the upstream to the config but I'm not quite sure what to do now or if there's anything I should be doing (you do the actual merges to the official main branch not contributors, correct?). I'm sorry for the needing my hand held but I'm clearly not doing things correctly and I'd really like to be able to contribute to projects without being a burden at all.

Thanks again for your time!

akinomyoga commented 11 months ago

Should I do the second part about creating another branch named add-nala-aliases or should I leave the rest up to you for now and just use this as a reference for any future projects?

For the present PR, you don't have to try to fix it although it was not in the expected form. Once a PR is created on GitHub, it is impossible to switch the branch unless you close the PR and create another independent PR.

You can create a branch next time you contribute to this or another project for some other changes.

I've added the upstream to the config but I'm not quite sure what to do now or if there's anything I should be doing

Currently, there are no additional things that you are required to finish.

I am going to wait for a certain period of cooling time in case you want to add further changes. In the original PR #460, you had additional changes several times, so it is good to wait for a while until additional changes do not arise anymore.

(you do the actual merges to the official main branch not contributors, correct?).

Right, I'll finally do the merging.

I'm sorry for the needing my hand held but I'm clearly not doing things correctly

Don't worry, it seems to me that many people are not doing things "correctly" for Git, but it still works with extra effort. Nevertheless, it would definitely be nice to learn how to do things in the correct way for smooth development. I appreciate it.

GR3YH4TT3R93 commented 11 months ago

It's good to be merged whenever you're ready 😊

akinomyoga commented 11 months ago

Thanks!

akinomyoga commented 11 months ago

I've merged it.