Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to Commit in github?

Tags:

github

i am getting error when i am trying to commit

i am getting error sh.exe: notepad: command not found please short out my problem Thanks

like image 395
Shakti Avatar asked Apr 25 '26 19:04

Shakti


1 Answers

For the commit to GitHub part, you need to add (if you have created an empty yourRepo on GitHub):

git config user.name yourGitHubUsername
git config user.email yourGitHubEmail
git add .
git commit -m "First commit"
git remote add origin https://[email protected]/yourAccount/yourRepo
git push -u origin master

If that fails because GitHub already created one commit when you initialized your "empty" repo (it can add by default a README.md and a .gitignore), do a:

git pull --rebase origin master
git push -u origin master

If you really have to call notepad from a mingw session, you can use this wrapper:

#!/bin/sh
'C:/Program Files (x86)/Notepad++/notepad++.exe' -multiInst -notabbar \
  -nosession -noPlugin "$(cygpath -w "$*")"

But remember you can use msysgit from a DOS session as well.

like image 173
VonC Avatar answered Apr 29 '26 05:04

VonC



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!