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

Changing tag #43

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Changing tag #43

wants to merge 1 commit into from

Conversation

disha03
Copy link

@disha03 disha03 commented Jun 19, 2020

#40 fix_tag_issue

@tushar5526
Copy link
Member

tushar5526 commented Jun 19, 2020

@disha03 Its better to have only one commit for such small errors, you can use git squash to combine those 3 commits into one. Then force push the branch back to remote git push -f origin <branch-name>

@tushar5526
Copy link
Member

You have modified the about.html too. Please revert it :)

Copy link
Member

@tushar5526 tushar5526 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make the changes please

@disha03
Copy link
Author

disha03 commented Jun 20, 2020

@tushar5526 sir, I had made the changes in 'about.html' file earlier(for only,other issue),Now,I made new branch and changed index.html only,As it was older commit, how can I revert it? because I tried.And how can I see this website , I don't know how to host it on GitHub?

@disha03
Copy link
Author

disha03 commented Jun 20, 2020

I tried ,I have reverted all the unnecessary commits,except tag_issue(as, it is solution of this issue),Did I do this correctly? Were u talking about these changes or anything else?

@tushar5526
Copy link
Member

tushar5526 commented Jun 20, 2020

@disha03 you can just mention me whenever you need help, you don't have to call me sir or any other mentors :)
Yes you made the changes correctly, now I want you to squash your 7 commits into 1 commit.

see this Link

@disha03
Copy link
Author

disha03 commented Jun 20, 2020

@tushar5526 ,Okay @tushar5526 :') ,The link you provided,I saw and read this but the commits have already reverted .Now, can this command merge all the commits into 1? and what is the need to squash the commits into 1 because I reverted the commits already?

@tushar5526
Copy link
Member

tushar5526 commented Jun 20, 2020

@disha03, yes you have reverted the wrong commits but now we have 7 commits for one small fix, this will lead to unnecessary complications in our project's history. Suppose, if I merge this and someone in the future wants to work on the website, he will see 7 commits leading to fixing of one tag. It will be more complicated to understand what's going on. At first, he has to figure out why those changes were reverted, etc.

I hope I am making some sense :p

Reverts are mostly used in the master branch of the main repo ( the repo which everyone forks ) so that everyone who has a current fork is notified we did some changes. If you have a unique local copy ( forked repo ), then we can remove these revert commits to have a clear history of our project.

Yes git squash will merge your 7 commits into one

git checkout changing_tag
git rebase -i HEAD~7 
...
(follow the steps from link then )

@disha03
Copy link
Author

disha03 commented Jun 20, 2020

@tushar5526

Unlink of file 'simple-static-website' failed. Should I try again? (y/n) y

I am facing this issue again and again when I am trying to use squash,IDK y?

@disha03
Copy link
Author

disha03 commented Jun 20, 2020

(changing_tag|REBA SE-i 7/8)

something this is also showing,'REBA SE-i 7/8",with my branch name

@disha03
Copy link
Author

disha03 commented Jun 20, 2020

And whatever I am doing, no. of commits is increasing,I used the squash command as given in link,but It is not working accordingly.

@tushar5526
Copy link
Member

Follow these steps

git checkout changing_tag
git rebase -i HEAD~10

This will open nano editor , change all the pick to squash except the first one.
something like this

pick 345afd534
squash 234234safd
squash 2sfd23e3
...

Then Ctrl + o Enter and Ctrl + X to save and exit
Then modify the commit messages

After that force push the branch back git push -f origin changing _tag

author Divyansh Rastogi <[email protected]> 1591373854 +0530
committer disha03 <[email protected]> 1592653694 +0530

final

News Page Created

Revert "News Page Created"

This reverts commit 9405a54.

First commit

first commit

fix_tag_#40

tag_issue_#40

Revert "fix_tag_#40"

This reverts commit 4a9c9f6.

Revert "first commit"

This reverts commit 87b1ea3.

Revert "First commit"

This reverts commit b6923eb.

Revert "First commit"

This reverts commit b6923eb.
@disha03
Copy link
Author

disha03 commented Jun 20, 2020

@tushar5526 I tried ,but I guess something different has happened :!

@tushar5526
Copy link
Member

You squashed it properly, but you did some extra changes in the file @disha03

@disha03
Copy link
Author

disha03 commented Jun 20, 2020

No,I didn't @tushar5526

@tushar5526
Copy link
Member

Take a look at this, you changed some lines here

@disha03
Copy link
Author

disha03 commented Jun 21, 2020

@tushar5526 Exactly,this is what I am saying, how these lines have changed,I didn't change them,and I read the changes, then I found, the new stuff is good, but I didn't change anything, except the tag, maybe author changed the text.IDK.

@tushar5526
Copy link
Member

Hey @disha03, I think you were working on some other issue as well and switched the branch with files added. For now this is a not big issue, so you can consider syncing your fork first and then make a new branch.

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

Successfully merging this pull request may close these issues.

3 participants