GitKraken: An external application is performing a rebase on this repository - gitkraken

Hi I just changed my email on all the commits in my project. After I ran this script from the terminal all worked good.
Now I have an error in the GitKraken dashboard with the following error:
How do I remove it?
Thanks!

Fixed: put the following in the CLI git rebase --abort
Basically since I ran the script the above is stuck in a rebase process until I abort it.
Make sure to not create a new branch when rebasing and then exiting otherwise it will duplicate the git commits.

Related

Github Site shows deleted commit in the commit tab

I am new to github commands and I am a bit confused about what I am doing.
I want to delete the "MegaMan Game" commit, revert all changes, and make it dissapear from github
history. Following this other stack overflow question Delete commits from a branch in Git, I ran the git reset --hard HEAD ~1 command. The commit seems to be deleted judging by the git log command, but on the github website it still shows that the "MegaMan Game" commit is still there. Also in source tree happens the same thing. The commit still shows there.
I am a bit confused. Is the website wrong about the commits? Did I run the command wrong?
Here is an image with the exact commands and what git
This is a noob question. I need help to undestand how this works.
You deleted commit in your local branch. You must send this change to the upstream branch(to github).
git push --force

Can't to push commits from local branch to github repository

I was committing and pushing in ordinary for my repository.
but once i used command of git checkout for change to the previous version of my repository.
after that i tried to commit and push, then it can not completed.
i try to use the --no-verify command to push the commit but it also not success.
error: failed to push some refs to 'https://github.com/ruwanliyanage123/Hair-4-U-Hospital.git'
i want to push my commit into github repository
Since you switched to a previous version of your repository, your head is most probably detached. You can't just go back anywhere in your history and make commits.
Consider making a branch from there and then commit to it.
Try to first check in which branch you are working do git branch, check is the one you are working. Then I sometimes do git pull to just make sure that the connection is working this should not delete your progress the you should be able to do git push. If you are afraid youll mess up first do a local back up of all project files except for the .git one which are hidden by default in windows.Lastly I would suggest never posting the actual link to your github repository in case whatever you are working is important, you can just replace with
https://github.com/user/projectname.git

"Commit failed - exit code 1 received" when trying to commit a new local reprository in gihub desktop

when I am trying to commit my new local repository at GitHub from GitHub-desktop it is throwing an error "Commit failed - exit code 1 received"
Regarding:
Check first if you have added files to your index.
Open the command line and check your git status.
Second, see desktop/desktop issue 3701:
some users have run into this error due to having nested .git directories.
Can you try searching your repository to see if you have multiple .git directories?
Had a .git in my repository (which I needed) and a .git in a subfolder (which I deleted), then it worked.
Finally, check if you have any submodule (a .gitmodules file at the root of your repo).
See desktop/desktop issue 1770.
If I commit changes in submodule myself than GitHub Desktop is able to push and/or commit changes after that. After submodule is committed manually SHA1 changes from dirty. At this point I can commit to main repo.
I removed the repository from GitHub Desktop (not from the disk) and then added it again as a local repository and this solved the issue for me.
I was receiving this error as well, but unlike others I did not have have any nested .git folders. When trying to view changes, each of the files appeared as "empty" until I removed the repository from GitHub Desktop and added it again.
I encountered the same thing and it's caused by .git in subfolder.
Just removed all related .git files and the error disappeared.
exitcode 1 while committing is not always a real "error".
i do not know GitHub-desktop (and which commands exactly be executed by GitHub-desktop) but maybe your problem has the same core-"problem" as my problem some days ago.
in my case i had a branch master which tracks/follows origin/master. i executed:
git pull --no-commit --no-ff
git commit -m "merge"
i found that if origin/master has no commits which can be pulled by the git pull-command then the git commit-command is obviously doing nothing because there are no staged changes and has (imo: surprisingly) the exit-code 1 although no error occurred.
(i guess git commit should have exitcode 0 if it has really created a commit).
Resolved.
I committed via cmd prompt and did not face this issue again.
For the Github desktop,click on the plus sign on the left-hand side of your Github desktop and then select 'Discard .git' files.

git checkout error: cannot create directory: Permission denied

I am facing issues with the git checkout command. Please help.
Here is what I did.
Created a local directory. Created some files. Initiated a git repo locally.
Created a repo in bitbucket & pushed my local repo to bitbucket
Created a new branch locally, b01
Added new files to b01, committed them and successfully pushed the branch to bitbucket
Now I am trying to merge b01 with master and that is where I am facing issues. I am not able to checkout master.
Lists of commands used and the error details:
git clone [my repo]
git checkout -b b01
Hereafter I made multiple changes, including creating new files and directories, committed those changes and successfully pushed the changes on that branch to the repo. like:
git push -u origin b01
Now I am done with the changes and want to merge it to the master branch. So I do a:
git checkout master
Here is the error it throws:
fatal: cannot create directory at 'workfolder': Permission denied
Git keeps me in b01, but deletes ALL the files I had created in the branch.
So if I now do a
git status
it shows me:
On branch b01
Your branch is upto date with 'orgin/b01'
Changes not staged for commit:
(use "git add/rm .....)
deleted: new file1
deleted: new file2
<list of the new files I had added but which got deleted as a result of the command>
I am having to run a
git checkout -- .
to restore the files.
Please help.
I had a similar situation. Though it was due to me having the solution open in visual studio. Closing visual studio and doing a git reset put me into a good spot.
I.e. check to see if any processes are locking the folder/files.
As it is already said, these could happen when another process is already accessing the files, so closing any app that could potentially be using it will help, as of me Visual Code was opened and closing it did help.
I know the question is a little bit old, but as top answer suggests using --hard flag, which may not be necessary, I decided to post this.
Probable problem cause: some other process is using/locking file/folder you're trying to remove
Solution: stop this process, then try again. One way to found it is via Resource Monitor (way I've learned from here):
Open Task Manager
Navigate to Performance tab
Click Open Resource Monitor at the bottom
Navigate to CPU tab
At Associated Handles section, there's a search field - enter path to dir/file for which you're getting 'Permission denied' error
(Review and) stop any process that appeares as search result.
Just change permission to allow one or group user for this 'workedfolder' by this
sudo chmod u+w <exact_workedfolder_permission_denied>
or
sudo chown -R user_name:user_name <exact_workedfolder_permission_denied>
First, between every operation with git I would recommend doing a quick git status. I cannot tell you how many times this has saved me lots of headaches.
A couple of things I might try to shed some light on the problem(s):
You said you created directories and made lots of changes to b01, then pushed it to the origin. Look at the commit for this action `git show . Did you change permissions on the parent directory of "workfolder"? This might be of help.
Are you on windows? If you are, how deep in directory paths are you? Is the path length exceeding windows max? Reference here.
If none of these work, have you tried creating a throwaway branch off of b01, and merging "master"? This sometimes smokes out a cause.
The ugly hail-Mary. Have you tried making a copy/paste of "b01" outside the repository, rolling back to the matching last commit of "master", and then pasting the changes in the "b01" copy over master? When things are totally upside down and not making sense, sometimes it is easier to work backwards through the problem to figure out what went wrong and learn what not to do in the future.
In my case I just checked out to the offending commit using the commit hash rather than the branch name.
304/5000
The answer to that can be quite simple. Say you want to mash your branch with a master, you can do the following:
git checkout -b master-2 // from your current branch where all the changes are
git branch -D master
git branch -m master-2 master
git push origin master
Ready! Remember that this is in case you want to overwrite everything in the branch

EGIT: cannot resolve ORIG_HEAD

When I try to use merge tool
it's not working and show for me following error dialog.
There is no git reference ORIG_HEAD created, which should point to the commit that was checked out before a merge or rebase operation was started.