-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
feat-#378: created readme for git conflicts #412
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Hey @rushil-b-patel! Thanks for sticking to the guidelines! High five! 🙌🏻 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we first aim on only 2 dropdown points?
- How to hard sync local master with original upstream?
- Why am i seeing previous commit messages in my new branch?
Just like bullet points and a very nice image illustration as i shared would be really helpful, I guess you can generate it via chatgpt or in some blogs, you can put it neatly
GIT_CONFLICTS.md
Outdated
# Wanderlust Project | ||
|
||
## Overview | ||
Welcome to the Wanderlust project! This is a collaborative effort to build an amazing application. We appreciate your contributions and aim to make the process as smooth as possible. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Kindly remove this section
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
GIT_CONFLICTS.md
Outdated
## Better commits | ||
|
||
You should not push what is not needed. Doing **`git commit -a`**, instead, commits just everything. This, often, is bad. | ||
You’d better use **`git add`** and, most of all, **`git add -p`** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We are in 3 sec world, people can't hold their eyes more than 3 seconds, to convince them to read, we have to keep it in simple bullet points
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
Hey @krishnaacharyaa sorry for the late response. I have made some changes with the help of co-pilot. Please review. |
As Discussed in discord @rushil-b-patel |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rushil-b-patel kindly acknowledge the review comments, expecting ownership of this bug
GIT_CONFLICTS.md
Outdated
To hard sync your local master branch with the upstream master branch, follow these steps in your main branch: | ||
|
||
- `git remote add upstream /url-to-original-repo` | ||
- `git fetch upstream` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can say it directly taken from the AI and not tested, how can /url-to-original-rep
work?
Acceptance criteria was everthing should be tested and working, and for now only 2 points we need to have as previous review comment
</details> | ||
|
||
## Better commits | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we actually need this?
GIT_CONFLICTS.md
Outdated
<details> | ||
<summary> | ||
<em>What should I do if I’m in a bad situation?</em> | ||
</summary> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same comment, kindly consider the review comment as whole, and don't expect me to hand hold and to pin point everything, I am not rigid on the content, but i accept the review comments are gracefully accepted and worked on
Closing as no inactive |
hey @krishnaacharyaa I'm sorry, I have been into placement stuff and getting time for this. But Please give me 2-3 days. I'll do it. |
Sure @rushil-b-patel , all the best for your placements, Hope you get the best !! |
sure @krishnaacharyaa , I'll get back to it... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the efforts, but I feel it would be better, If you pick other existing stories, tbh, I don't see we mutually getting benefit of the conversation we are having. respectfully.
Follow this while creating new branch and commiting changes: | ||
```sh | ||
- git checkout main/master | ||
- git branch -b new_branch |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll get error message when I run 60th line
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And kindly add the sync command as well
|
||
|
||
1. Convenient way to modify the most recent commit | ||
```sh |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
People usually don't do this, instead if we have 3rd main point as squashing of commit into new commit that would be great
<details> | ||
<summary> | ||
<em>Edit a commit</em> | ||
</summary> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if this is actually required, this section
``` | ||
2. Using git reset | ||
```sh | ||
git add . |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This naively thinks nothing is pushed, original scenario may be still worse, I have pushed my commit already now what should I do?
``` | ||
|
||
3. To undo the last two commits, use the commands: | ||
```sh |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can be avoided, as we don't normally end up here very often and again pushed commits it doesn't address
for more info refer this [blog](https://sentry.io/answers/undo-the-most-recent-local-git-commits/) | ||
|
||
4. Change the last commit message | ||
```sh |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same, this is the commit which is not pushed.
<details> | ||
<summary> | ||
<em>Good Practice</em> | ||
</summary> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Included already in the readme and this is FnQ, not a good place for good practice,
Only most popular trick GitHub questions and neatly providing suggestions to solve that
git commit --amend -m "New commit message" | ||
``` | ||
![git ammend showcase](https://github.com/rushil-b-patel/wanderlust/assets/96254453/4c5e73b1-e466-42b4-9053-d7044be4a50e) | ||
for more info, watch this [video](https://www.youtube.com/watch?v=q53umU5vMkk) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have already said not to use this types of images :)
Summary
A readme file for the common git conflicts that contributors face while contribting in open source.
Description
Created a readme file (GIT_CONFLICTS) in the root folder which includes common Q&A.
Issue(s) Addressed
Closes #378
Prerequisites