Trouble Accessing Command Line

Is there anyone that could help me understand why Github Desktop can’t access Git as I’ve already installed it? I’m just trying to merge code, unfortunately I’m not able to do so using web. Help??

Looks like a new update was recently installed.

Try restarting GitHub Desktop.

Hello, Yes, I’ve done so, same thing

Capture3

I think your first error was caused by the update, restarting should have fixed it.

The error on the new screenshot is telling you that the directory that you ran that command in, is not a git repository. If you’re sure that you are in the correct directory, you might have accidently deleted a folder called .git that was in that directory.

try cloning the project again, maybe into a new directory.

git clone https://github.com/YOUR-USERNAME/YOUR-REPOSITORY

or try to open the project in GitHub Desktop again.

So it seems that I was able to successfully merge, however, I am not able to commit and resolve the conflicts.

now, it’s telling you that there was a merge conflict.

A merge conflict is an event that occurs when Git is unable to automatically resolve differences in code between two commits.

If you click on Open in Notepad++ it will open that file.

Find the strings in the file. Think of it like “conflict dividers”.:

  • <<<<<<< HEAD
  • =======
  • >>>>>>> pr/2

The ======= line is the “center” of the conflict.

All the code between the center and the <<<<<<< HEAD line is content that exists in the current branch master which the HEAD ref is pointing to.

Alternatively, all code between the center and >>>>>>> pr/2 is content that is present in our merging branch.

  • remove the “conflict dividers” and keeping the portion of the code you want to keep.
  • save the file and go back to GitHub Desktop (it should allow you to continue the merge)

I understand, however, now the issue is I can’t access the previous screen of how to open the notepad to modify the conflict :sob:

Not sure why I found this little gem, apparently my noobiness has caused myself some confusion. My this be something on my end?

Capture7

run: git status

if it says “You have unmerged paths.”

then run: git merge --abort

Open GitHub Desktop and try to merge the branch again. (you will then see the screen where it guides you to open in notepad++ to modify the conflict)

Capture8

:thinking:

Open GitHub Desktop to open the project in Git Bash

image

You can also use the [ctrl]+[`] keyboard shortcut.


Then try to run: git status when the Git Bash terminal opens.

Mine doesn’t display ‘Open in Git Bash’, mine displays ‘Open in command prompt’. However, I ran: cd, in git bash and command prompt, and there was no output at all. Capture8

try runnging: echo %CD%

image

I’m quite puzzled atm.

At least in Bash cd just switches to the home directory, and doesn’t output anything. If you want the current directory in Bash (or any Unix-ish shell) use pwd.

How can I link the repo to git bash as you’ve shown in the picture Nathane? This seems to be why I may be having so much trouble.

@airtower-luna @/fintechntrusts2020 is using windows default command prompt

@fintechntrusts2020 Sure, I’m not sure that’s the issue here but it can’t hurt. Try installing Git Bash for Windows.

I’ve had Git Bash for Windows installed the whole time, perhaps I should uninstall and reinstall? Also is there a windows installation guide I can follow so that Github desktop repo recognizes Git Bash?