Skip to content

added aranya#1

Open
aranyadan wants to merge 2 commits intoarl-kgp:masterfrom
aranyadan:new
Open

added aranya#1
aranyadan wants to merge 2 commits intoarl-kgp:masterfrom
aranyadan:new

Conversation

@aranyadan
Copy link

No description provided.

@aranyadan
Copy link
Author

i added my name, the pushed, then added the < /br > tag and pushed again
so i have two commits. what can i do to delete a commit?
in my cloned repo in my laptop, i can revert / reset but how can i do that in my github account?
i tried resetting my files then git add ed them and the git commit ed them but it is giving merging faults
i rebased my local directory but then what command should i give to reflect the same changes in my account?

@abhinavjain241
Copy link
Contributor

I think rebasing should've solved the problem. Are you still getting the
error?

On Mon, Mar 2, 2015 at 6:54 PM, aranyadan notifications@github.com wrote:

i added my name, the pushed, then added the tag and pushed again
so i have two commits. what can i do to delete a commit?
in my cloned repo in my laptop, i can revert / reset but how can i do that
in my github account?
i tried resetting my files then git add ed them and the git commit ed them
but it is giving merging faults
i rebased my local directory but then what command should i give to
reflect the same changes in my account?


Reply to this email directly or view it on GitHub
#1 (comment)
.

Abhinav Jain
Second Year Undergraduate Student
Department of Mathematics
Indian Institute of Technology, Kharagpur

@nevalsar
Copy link

nevalsar commented Mar 3, 2015

@aranyadan I suspect the problem you are facing is due to differing histories in github repo (remote origin) and local repo. When you deleted a commit in your local repo using git reset and created a new commit, your history diverged from that of origin. This is the reason you're not able to push to origin because git tries to preserve repo histories unless you specify explicitly that you need to overwrite.

Overwriting the remote's history with your local one will delete the commit from the remote :

git push --force origin master

@aranyadan
Copy link
Author

i made my own repo and tried it out and its working fine now

On Tue, Mar 3, 2015 at 4:04 PM, Nevin Valsaraj notifications@github.com
wrote:

@aranyadan https://github.com/aranyadan I suspect the problem you are
facing is due to differing histories in github repo (remote origin) and
local repo. When you deleted a commit in your local repo using git reset
and created a new commit, your history diverged from that of origin. This
is the reason you're not able to push to origin.

Overwriting the remote's history with your local one will delete the
commit from the remote :

git push --force origin master


Reply to this email directly or view it on GitHub
#1 (comment)
.

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