Shakti
Shakti

Reputation: 89

How to Commit in 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

Upvotes: 3

Views: 1162

Answers (2)

VonC
VonC

Reputation: 1323175

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.

Upvotes: 1

sandipon
sandipon

Reputation: 986

Seps: 1.git init 2. git status 3. git add . 4. git commit -a 5. git status

Upvotes: 0

Related Questions