I have installed the git ,created repository , then I have tried to push from vs code to github repository with cmd
git push -u origin main
Git say error: failed to push some refs to 'github.com:loobj126/boredape-dapp-bj.git''
What's the problem?
https://github.com/loobj126/boredape-dapp-bj
i ve few approach yet still not resolve
https://komodor.com/learn/how-to-fix-failed-to-push-some-refs-to-git-errors/
Latest input :
after initialize
[2022-04-20T08:44:06.669Z] Validating found git in: C:\Program Files\Git\cmd\git.exe
[2022-04-20T08:44:06.796Z] Using git 2.35.3.windows.1 from C:\Program Files\Git\cmd\git.exe
[2022-04-20T10:45:43.723Z] > git init [128ms]
[2022-04-20T10:45:44.399Z] > git rev-parse --git-dir [72ms]
[2022-04-20T10:45:44.403Z] Open repository: c:\Users\loobj\boredape-dapp-bj
[2022-04-20T10:45:44.606Z] > git fetch [197ms]
[2022-04-20T10:45:44.676Z] > git symbolic-ref --short HEAD [119ms]
[2022-04-20T10:45:44.765Z] > git for-each-ref --format=%(refname)%00%(upstream:short)%00%(objectname)%00%(upstream:track) refs/heads/master refs/remotes/master [85ms]
[2022-04-20T10:45:44.872Z] > git remote --verbose [99ms]
[2022-04-20T10:45:44.888Z] > git for-each-ref --sort -committerdate --format %(refname) %(objectname) %(*objectname) [119ms]
[2022-04-20T10:45:45.019Z] > git config --get commit.template [122ms]
[2022-04-20T10:45:45.040Z] > git config --local branch.master.github-pr-owner-number [121ms]
[2022-04-20T10:45:45.300Z] > git symbolic-ref --short HEAD [101ms]
[2022-04-20T10:45:45.385Z] > git for-each-ref --format=%(refname)%00%(upstream:short)%00%(objectname)%00%(upstream:track) refs/heads/master refs/remotes/master [80ms]
[2022-04-20T10:45:45.490Z] > git for-each-ref --sort -committerdate --format %(refname) %(objectname) %(*objectname) [101ms]
[2022-04-20T10:45:45.507Z] > git remote --verbose [115ms]
[2022-04-20T10:45:45.589Z] > git config --get commit.template [76ms]
Click push
[2022-04-20T10:59:18.763Z] > git push boredape-dapp-bj master [153ms]
[2022-04-20T10:59:18.763Z] error: src refspec master does not match any
error: failed to push some refs to 'https://github.com/loobj126/boredape-dapp-bj.git'
[2022-04-20T11:00:41.028Z] > git fetch [141ms]
[2022-04-20T11:00:41.220Z] > git symbolic-ref --short HEAD [68ms]
[2022-04-20T11:00:41.286Z] > git for-each-ref --format=%(refname)%00%(upstream:short)%00%(objectname)%00%(upstream:track) refs/heads/master refs/remotes/master [63ms]
[2022-04-20T11:00:41.380Z] > git for-each-ref --sort -committerdate --format %(refname) %(objectname) %(*objectname) [91ms]
[2022-04-20T11:00:41.394Z] > git remote --verbose [102ms]
[2022-04-20T11:00:41.485Z] > git config --get commit.template [84ms]
Solution 1: for error: src refspec master does not match any.
All you need to perform is git commit with a proper message and then do git push to the remote origin to avoid any errors.
mkdir repo && cd repo
git remote add origin /path/to/origin.git
git add .
git commit -m "initial commit"
git push origin master
Solution 2 – First, check what refs you have, and once you find that, make a git push to the specific remote branch.
# To get all the ref
git show-ref
# replace with your branch name according to ref
git push origin HEAD:<branch>
this worked for me.
To fix the error, go on and run following commands:
git pull --rebase origin main
git push -u origin main
If the first command above runs successfully, you should get a response that says: Successfully rebased and updated refs/heads/main.
The second command pushes your local repo's current state to the remote branch.
ref: https://www.freecodecamp.org/news/error-failed-to-push-some-refs-to-how-to-fix-in-git/
Related
I am trying to commit changes from my Flutter codes to my GitHub repositories but this error keeps showing up.
This is the gitlog.
I want to sync it to GitHub.
Also, how can I disconnect my local code to a repository in GitHub since this error keeps showing off?
[2022-07-09T08:38:34.408Z] Log level: Info
[2022-07-09T08:38:34.409Z] [info] Validating found git in: C:\Program Files\Git\cmd\git.exe
[2022-07-09T08:38:34.557Z] [info] Using git 2.36.0.windows.1 from C:\Program Files\Git\cmd\git.exe
[2022-07-09T08:38:35.008Z] > git rev-parse --show-toplevel [440ms]
[2022-07-09T08:38:35.627Z] > git rev-parse --git-dir --git-common-dir [603ms]
[2022-07-09T08:38:35.638Z] [info] Open repository: c:\Users\JHON MICHEAL\Downloads\grabbitapp-v1.0.9
[2022-07-09T08:38:36.070Z] > git status -z -uall [413ms]
[2022-07-09T08:38:36.154Z] > git fetch [506ms]
[2022-07-09T08:38:36.284Z] > git symbolic-ref --short HEAD [210ms]
[2022-07-09T08:38:36.518Z] > git for-each-ref --format=%(refname)%00%(upstream:short)%00%(objectname)%00%(upstream:track)%00%(upstream:remotename)%00%(upstream:remoteref) refs/heads/main refs/remotes/main [230ms]
[2022-07-09T08:38:36.839Z] > git for-each-ref --sort -committerdate --format %(refname) %(objectname) %(*objectname) [317ms]
[2022-07-09T08:38:36.840Z] > git remote --verbose [314ms]
[2022-07-09T08:38:37.181Z] > git config --get commit.template [322ms]
[2022-07-09T08:38:37.646Z] > git status -z -uall [459ms]
[2022-07-09T08:38:37.722Z] > git check-ignore -v -z --stdin [326ms]
[2022-07-09T08:38:37.944Z] > git ls-files --stage -- C:\Users\JHON MICHEAL\Downloads\grabbitapp-v1.0.9\lib\main.dart [375ms]
[2022-07-09T08:38:38.019Z] > git symbolic-ref --short HEAD [354ms]
[2022-07-09T08:38:38.029Z] > git show --textconv :lib/main.dart [484ms]
[2022-07-09T08:38:38.211Z] > git cat-file -s 5d6402f0276f3fd5b022360f84c102449513b154 [263ms]
[2022-07-09T08:38:38.283Z] > git for-each-ref --format=%(refname)%00%(upstream:short)%00%(objectname)%00%(upstream:track)%00%(upstream:remotename)%00%(upstream:remoteref) refs/heads/main refs/remotes/main [260ms]
[2022-07-09T08:38:38.614Z] > git ls-files --stage -- C:\Users\JHON MICHEAL\Downloads\grabbitapp-v1.0.9\lib\main.dart [385ms]
[2022-07-09T08:38:38.654Z] > git remote --verbose [364ms]
[2022-07-09T08:38:38.655Z] > git for-each-ref --sort -committerdate --format %(refname) %(objectname) %(*objectname) [368ms]
[2022-07-09T08:38:38.977Z] > git config --get commit.template [311ms]
[2022-07-09T08:38:38.991Z] > git cat-file -s 5d6402f0276f3fd5b022360f84c102449513b154 [373ms]
[2022-07-09T08:38:39.126Z] > git status -z -uall [137ms]
[2022-07-09T08:38:39.174Z] > git symbolic-ref --short HEAD [45ms]
[2022-07-09T08:38:39.221Z] > git for-each-ref --format=%(refname)%00%(upstream:short)%00%(objectname)%00%(upstream:track)%00%(upstream:remotename)%00%(upstream:remoteref) refs/heads/main refs/remotes/main [44ms]
[2022-07-09T08:38:39.281Z] > git for-each-ref --sort -committerdate --format %(refname) %(objectname) %(*objectname) [57ms]
[2022-07-09T08:38:39.282Z] > git remote --verbose [55ms]
[2022-07-09T08:38:39.366Z] > git config --get commit.template [73ms]
[2022-07-09T08:40:45.853Z] > git check-ignore -v -z --stdin [108ms]
[2022-07-09T08:40:48.737Z] > git check-ignore -v -z --stdin [87ms]
[2022-07-09T08:40:51.641Z] > git branch [79ms]
[2022-07-09T08:40:51.763Z] > git rm --cached -r -- . [118ms]
[2022-07-09T08:40:51.763Z] error: the following file has staged content different from both the
file and the HEAD:
.dhiwise/config
(use -f to force removal)
[2022-07-09T08:41:39.111Z] > git fetch [112ms]
[2022-07-09T08:41:39.188Z] > git status -z -uall [69ms]
[2022-07-09T08:41:39.236Z] > git symbolic-ref --short HEAD [43ms]
[2022-07-09T08:41:39.308Z] > git for-each-ref --format=%(refname)%00%(upstream:short)%00%(objectname)%00%(upstream:track)%00%(upstream:remotename)%00%(upstream:remoteref) refs/heads/main refs/remotes/main [69ms]
[2022-07-09T08:41:39.356Z] > git for-each-ref --sort -committerdate --format %(refname) %(objectname) %(*objectname) [46ms]
[2022-07-09T08:41:39.359Z] > git remote --verbose [44ms]
[2022-07-09T08:41:39.406Z] > git config --get commit.template [38ms]
[2022-07-09T08:41:40.401Z] > git ls-files --stage -- C:\Users\JHON MICHEAL\Downloads\grabbitapp-v1.0.9\lib\main.dart [39ms]
[2022-07-09T08:41:40.443Z] > git cat-file -s 5d6402f0276f3fd5b022360f84c102449513b154 [39ms]
[2022-07-09T08:41:40.516Z] > git show --textconv :lib/main.dart [45ms]
[2022-07-09T08:42:07.781Z] > git status -z -uall [84ms]
[2022-07-09T08:42:07.896Z] > git symbolic-ref --short HEAD [111ms]
[2022-07-09T08:42:07.939Z] > git ls-files --stage -- C:\Users\JHON MICHEAL\Downloads\grabbitapp-v1.0.9\lib\main.dart [106ms]
[2022-07-09T08:42:07.981Z] > git for-each-ref --format=%(refname)%00%(upstream:short)%00%(objectname)%00%(upstream:track)%00%(upstream:remotename)%00%(upstream:remoteref) refs/heads/main refs/remotes/main [81ms]
[2022-07-09T08:42:08.028Z] > git cat-file -s 5d6402f0276f3fd5b022360f84c102449513b154 [85ms]
[2022-07-09T08:42:08.075Z] > git remote --verbose [86ms]
[2022-07-09T08:42:08.082Z] > git for-each-ref --sort -committerdate --format %(refname) %(objectname) %(*objectname) [96ms]
[2022-07-09T08:42:08.178Z] > git config --get commit.template [84ms]
[2022-07-09T08:42:08.329Z] > git show --textconv :lib/main.dart [222ms]
[2022-07-09T08:42:09.080Z] > git ls-files --stage -- C:\Users\JHON MICHEAL\Downloads\grabbitapp-v1.0.9\lib\main.dart [86ms]
[2022-07-09T08:42:09.116Z] > git cat-file -s 5d6402f0276f3fd5b022360f84c102449513b154 [33ms]
[2022-07-09T08:42:09.182Z] > git show --textconv :lib/main.dart [40ms]
[2022-07-09T08:44:39.607Z] > git fetch [101ms]
[2022-07-09T08:44:39.688Z] > git status -z -uall [69ms]
[2022-07-09T08:44:39.732Z] > git symbolic-ref --short HEAD [35ms]
[2022-07-09T08:44:39.774Z] > git for-each-ref --format=%(refname)%00%(upstream:short)%00%(objectname)%00%(upstream:track)%00%(upstream:remotename)%00%(upstream:remoteref) refs/heads/main refs/remotes/main [38ms]
[2022-07-09T08:44:39.842Z] > git for-each-ref --sort -committerdate --format %(refname) %(objectname) %(*objectname) [61ms]
[2022-07-09T08:44:39.843Z] > git remote --verbose [58ms]
[2022-07-09T08:44:39.914Z] > git config --get commit.template [40ms]
[2022-07-09T08:44:40.845Z] > git ls-files --stage -- C:\Users\JHON MICHEAL\Downloads\grabbitapp-v1.0.9\lib\main.dart [42ms]
[2022-07-09T08:44:40.894Z] > git cat-file -s 5d6402f0276f3fd5b022360f84c102449513b154 [46ms]
[2022-07-09T08:44:40.950Z] > git show --textconv :lib/main.dart [43ms]
[2022-07-09T08:44:46.970Z] > git -c user.useConfigOnly=true commit --quiet [964ms]
[2022-07-09T08:44:46.970Z] Error: Bad status code: 500
at ClientRequest.<anonymous> (c:\Users\JHON MICHEAL\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\git\dist\git-editor-main.js:1:470)
at Object.onceWrapper (node:events:510:26)
at ClientRequest.emit (node:events:390:28)
at HTTPParser.parserOnIncomingClient (node:_http_client:623:27)
at HTTPParser.parserOnHeadersComplete (node:_http_common:128:17)
at Socket.socketOnData (node:_http_client:487:22)
at Socket.emit (node:events:390:28)
at addChunk (node:internal/streams/readable:315:12)
at readableAddChunk (node:internal/streams/readable:289:9)
at Socket.Readable.push (node:internal/streams/readable:228:10)
error: There was a problem with the editor '"c:\Users\JHON MICHEAL\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\git\dist\git-editor.sh"'.
Please supply the message using either -m or -F option.
[2022-07-09T08:44:47.017Z] > git config --get-all user.name [41ms]
[2022-07-09T08:44:47.059Z] > git config --get-all user.email [39ms]
[2022-07-09T08:48:45.145Z] > git fetch [139ms]
[2022-07-09T08:48:45.220Z] > git ls-files --stage -- C:\Users\JHON MICHEAL\Downloads\grabbitapp-v1.0.9\lib\main.dart [76ms]
[2022-07-09T08:48:45.321Z] > git cat-file -s 5d6402f0276f3fd5b022360f84c102449513b154 [97ms]
[2022-07-09T08:48:45.408Z] > git status -z -uall [242ms]
[2022-07-09T08:48:45.463Z] > git show --textconv :lib/main.dart [106ms]
[2022-07-09T08:48:45.496Z] > git symbolic-ref --short HEAD [82ms]
[2022-07-09T08:48:45.545Z] > git for-each-ref --format=%(refname)%00%(upstream:short)%00%(objectname)%00%(upstream:track)%00%(upstream:remotename)%00%(upstream:remoteref) refs/heads/main refs/remotes/main [45ms]
[2022-07-09T08:48:45.613Z] > git for-each-ref --sort -committerdate --format %(refname) %(objectname) %(*objectname) [64ms]
[2022-07-09T08:48:45.617Z] > git remote --verbose [64ms]
[2022-07-09T08:48:45.709Z] > git config --get commit.template [76ms]
[2022-07-09T08:48:46.506Z] > git ls-files --stage -- C:\Users\JHON MICHEAL\Downloads\grabbitapp-v1.0.9\lib\main.dart [54ms]
[2022-07-09T08:48:46.546Z] > git cat-file -s 5d6402f0276f3fd5b022360f84c102449513b154 [36ms]
[2022-07-09T08:48:46.618Z] > git show --textconv :lib/main.dart [40ms]
This is shown if the command output is clicked
Go to VSCode's settings and search for git: use editor as commit input.
An option with tick box will appear:
If that option is on just turn it off by unticking it.
You shouldn't leave blank the message before you commit the changes :D
Go to settings and untick the option Git: use editor as commit input:
I'm still very new to all these so please be patient with me.
I've recently changed my GitHub username and that is when I started noticing this issue: files or folders that are manually created on VS code or in the windows folder don't get uploaded onto GitHub. Whenever I try git add. & commit commands, I get this error message below:
warning: could not open directory '.vscode/': Permission denied
However, if I create a file on GitHub itself, say an index HTML file, it shows up on my windows folder. I can push any changes to this HTML file made on VS code and it shows up GitHub.
I have provided the log below if it's of any help.
Looking for git in: C:\Program Files\Git\cmd\git.exe
Using git 2.27.0.windows.1 from C:\Program Files\Git\cmd\git.exe
> git rev-parse --git-dir
Open repository: c:\Users\raeye\AppData\Local\Packages\CanonicalGroupLimited.UbuntuonWindows_79rhkp1fndgsc\LocalState\rootfs\home\raeyean\code\raeleneho\todoapp
> git status -z -u
> git symbolic-ref --short HEAD
> git rev-parse main
> git config --global user.email
> git check-ignore -v -z --stdin
> git rev-parse --symbolic-full-name main#{u}
> git rev-list --left-right main...refs/remotes/origin/main
> git for-each-ref --sort -committerdate --format %(refname) %(objectname)
> git remote --verbose
> git config --get commit.template
> git show --textconv :html/todoList.html
> git ls-files --stage -- C:\Users\raeye\AppData\Local\Packages\CanonicalGroupLimited.UbuntuonWindows_79rhkp1fndgsc\LocalState\rootfs\home\raeyean\code\raeleneho\todoapp\html\todoList.html
> git show --textconv :.vscode/settings.json
> git ls-files --stage -- C:\Users\raeye\AppData\Local\Packages\CanonicalGroupLimited.UbuntuonWindows_79rhkp1fndgsc\LocalState\rootfs\home\raeyean\code\raeleneho\todoapp\.vscode\settings.json
> git show --textconv :html/todoList.html
> git ls-files --stage -- C:\Users\raeye\AppData\Local\Packages\CanonicalGroupLimited.UbuntuonWindows_79rhkp1fndgsc\LocalState\rootfs\home\raeyean\code\raeleneho\todoapp\html\todoList.html
> git status -z -u
> git symbolic-ref --short HEAD
> git rev-parse main
> git rev-parse --symbolic-full-name main#{u}
> git rev-list --left-right main...refs/remotes/origin/main
> git for-each-ref --sort -committerdate --format %(refname) %(objectname)
> git remote --verbose
> git config --get commit.template
> git status -z -u
> git symbolic-ref --short HEAD
> git rev-parse main
> git rev-parse --symbolic-full-name main#{u}
> git rev-list --left-right main...refs/remotes/origin/main
> git for-each-ref --sort -committerdate --format %(refname) %(objectname)
> git remote --verbose
> git config --get commit.template
> git status -z -u
> git ls-files --stage -- C:\Users\raeye\AppData\Local\Packages\CanonicalGroupLimited.UbuntuonWindows_79rhkp1fndgsc\LocalState\rootfs\home\raeyean\code\raeleneho\todoapp\html\todoList.html
> git symbolic-ref --short HEAD
> git show --textconv :html/todoList.html
> git rev-parse main
> git rev-parse --symbolic-full-name main#{u}
> git rev-list --left-right main...refs/remotes/origin/main
> git for-each-ref --sort -committerdate --format %(refname) %(objectname)
> git remote --verbose
> git config --get commit.template
> git init
error: could not write config file C:/Users/raeye/AppData/Local/Packages/CanonicalGroupLimited.UbuntuonWindows_79rhkp1fndgsc/LocalState/rootfs/home/raeyean/code/raeleneho/todoapp/.git/config: Permission denied
fatal: could not set 'core.repositoryformatversion' to '0'
> git status -z -u
> git ls-files --stage -- C:\Users\raeye\AppData\Local\Packages\CanonicalGroupLimited.UbuntuonWindows_79rhkp1fndgsc\LocalState\rootfs\home\raeyean\code\raeleneho\todoapp\html\todoList.html
> git symbolic-ref --short HEAD
> git rev-parse main
> git show --textconv :html/todoList.html
> git rev-parse --symbolic-full-name main#{u}
> git rev-list --left-right main...refs/remotes/origin/main
> git for-each-ref --sort -committerdate --format %(refname) %(objectname)
> git remote --verbose
> git config --get commit.template
> git status -z -u
> git ls-files --stage -- C:\Users\raeye\AppData\Local\Packages\CanonicalGroupLimited.UbuntuonWindows_79rhkp1fndgsc\LocalState\rootfs\home\raeyean\code\raeleneho\todoapp\html\todoList.html
> git show --textconv :html/todoList.html
> git symbolic-ref --short HEAD
> git rev-parse main
> git rev-parse --symbolic-full-name main#{u}
> git rev-list --left-right main...refs/remotes/origin/main
> git for-each-ref --sort -committerdate --format %(refname) %(objectname)
> git remote --verbose
> git config --get commit.template
If you can fetch but not push, that means your repository is a public one, but your git config credential.helper, probably set to manager (even in your WSL2 Ubuntu session), has cached the wrong credential.
Try and type:
cd /path/to/repo
git remote set-url origin https://<myNewGitHubAccount>#github.com/<myNewGitHubAccount>/myRepo
Then try and push again: a popup should ask for your GitHub Account password (or better yet, for a PAT -- Personal Access Token)
If you go the SSH route, make sure to follow "Connecting to GitHub with SSH
", and check if ssh -Tv git#github.com does end up with a welcome message.
I want to pysh my project to a github repository called luna.git:
I followed the instructions
echo “# luna” >> README.md
git init
git add README.md
git commit -m "first commit"
git remote add origin https://github.com/raouiyounes/luna.git
git push -u origin master
But I get this error
error: src refspec master does not match any.
error: impossible de pousser des références vers ‘https://github.com/raouiyounes/luna.git’
Maybe you just need to commit.
Try this:
git add .
git commit -m "initial commit"
git push origin master
You can do :
git push origin HEAD:branch-name
Successfully linked up a repository from GitHub to local, after editing, file model\genre.js needs to be upload and commit back to GitHub. So, I did,
In Source Control panel, in Changed list, click on the "+" sign to make it to staged. File advanced from Changed to Staged.
Same panel, click on ... from the top, then "Commit staged", hit Enter.
This file is gone from Staged list, now only package.json and package-lock.json left in Changed list which is alright as I don't want to touch the masters in GitHub.
Looks perfect. Checking GitHub, oops, shows update was 2 hrs ago, refresh the page, still. Opened up the file and check, not having my latest update.
Is it because I didn't Fork it beforehand? I'm a bit hesitate to git push origin master --force
Here is the Git output from VSCode:
Using git 2.10.2.windows.1 from C:\Program Files\Git\cmd\git.exe
git rev-parse --show-toplevel
git rev-parse --show-toplevel
git status -z -u
git config --get commit.template
git fetch
git symbolic-ref --short HEAD
git rev-parse master
git rev-parse --symbolic-full-name --abbrev-ref master#{u}
git rev-list --left-right master...origin/master
git for-each-ref --format %(refname) %(objectname)
git remote --verbose
git status -z -u
git symbolic-ref --short HEAD
git rev-parse master
git rev-parse --symbolic-full-name --abbrev-ref master#{u}
git rev-list --left-right master...origin/master
git for-each-ref --format %(refname) %(objectname)
git remote --verbose
git show :app.js
git show :populatedb.js
git fetch
git status -z -u
git symbolic-ref --short HEAD
git rev-parse master
git rev-parse --symbolic-full-name --abbrev-ref master#{u}
git rev-list --left-right master...origin/master
git for-each-ref --format %(refname) %(objectname)
git remote --verbose
git show :populatedb.js
git fetch
git show :populatedb.js
git status -z -u
git symbolic-ref --short HEAD
git rev-parse master
git rev-parse --symbolic-full-name --abbrev-ref master#{u}
git rev-list --left-right master...origin/master
git show :populatedb.js
git for-each-ref --format %(refname) %(objectname)
git remote --verbose
git fetch
git show :populatedb.js
git status -z -u
git show :populatedb.js
git symbolic-ref --short HEAD
git rev-parse master
git rev-parse --symbolic-full-name --abbrev-ref master#{u}
git rev-list --left-right master...origin/master
git for-each-ref --format %(refname) %(objectname)
git remote --verbose
git status -z -u
git symbolic-ref --short HEAD
git rev-parse master
git rev-parse --symbolic-full-name --abbrev-ref master#{u}
git rev-list --left-right master...origin/master
git for-each-ref --format %(refname) %(objectname)
git remote --verbose
git status -z -u
git symbolic-ref --short HEAD
git rev-parse master
git rev-parse --symbolic-full-name --abbrev-ref master#{u}
git rev-list --left-right master...origin/master
git for-each-ref --format %(refname) %(objectname)
git remote --verbose
git status -z -u
git symbolic-ref --short HEAD
git rev-parse master
git rev-parse --symbolic-full-name --abbrev-ref master#{u}
git rev-list --left-right master...origin/master
git for-each-ref --format %(refname) %(objectname)
git remote --verbose
git fetch
git status -z -u
git symbolic-ref --short HEAD
git rev-parse master
git rev-parse --symbolic-full-name --abbrev-ref master#{u}
git rev-list --left-right master...origin/master
git for-each-ref --format %(refname) %(objectname)
git remote --verbose
git show :populatedb.js
git show :models/genre.js
git status -z -u
git symbolic-ref --short HEAD
git rev-parse master
git rev-parse --symbolic-full-name --abbrev-ref master#{u}
git rev-list --left-right master...origin/master
git for-each-ref --format %(refname) %(objectname)
git remote --verbose
git fetch
git status -z -u
git symbolic-ref --short HEAD
git rev-parse master
git rev-parse --symbolic-full-name --abbrev-ref master#{u}
git rev-list --left-right master...origin/master
git for-each-ref --format %(refname) %(objectname)
git remote --verbose
git show :models/genre.js
git show HEAD:models/genre.js
git add -A -- c:\Users\Admin\Documents\LEARN\express-locallibrary-tutorial\models\genre.js
git status -z -u
git symbolic-ref --short HEAD
git rev-parse master
git rev-parse --symbolic-full-name --abbrev-ref master#{u}
git rev-list --left-right master...origin/master
git for-each-ref --format %(refname) %(objectname)
git remote --verbose
git show :models/genre.js
git fetch
git status -z -u
git symbolic-ref --short HEAD
git rev-parse master
git rev-parse --symbolic-full-name --abbrev-ref master#{u}
git rev-list --left-right master...origin/master
git for-each-ref --format %(refname) %(objectname)
git remote --verbose
git show :models/genre.js
git commit --quiet --allow-empty-message --file -
git status -z -u
git symbolic-ref --short HEAD
git rev-parse master
git rev-parse --symbolic-full-name --abbrev-ref master#{u}
git rev-list --left-right master...origin/master
git for-each-ref --format %(refname) %(objectname)
git remote --verbose
git show HEAD:models/genre.js
git fetch
git status -z -u
git symbolic-ref --short HEAD
git rev-parse master
git rev-parse --symbolic-full-name --abbrev-ref master#{u}
git rev-list --left-right master...origin/master
git for-each-ref --format %(refname) %(objectname)
git remote --verbose
git show HEAD:models/genre.js
git fetch
git status -z -u
git symbolic-ref --short HEAD
git rev-parse master
git rev-parse --symbolic-full-name --abbrev-ref master#{u}
git rev-list --left-right master...origin/master
git for-each-ref --format %(refname) %(objectname)
git remote --verbose
git show HEAD:models/genre.js
git status -z -u
git symbolic-ref --short HEAD
git rev-parse master
git rev-parse --symbolic-full-name --abbrev-ref master#{u}
git rev-list --left-right master...origin/master
git for-each-ref --format %(refname) %(objectname)
git remote --verbose
git show :models/genre.js
git fetch
git status -z -u
git symbolic-ref --short HEAD
git rev-parse master
git rev-parse --symbolic-full-name --abbrev-ref master#{u}
git rev-list --left-right master...origin/master
git for-each-ref --format %(refname) %(objectname)
git remote --verbose
git show :models/genre.js
git fetch
git status -z -u
git symbolic-ref --short HEAD
git rev-parse master
git rev-parse --symbolic-full-name --abbrev-ref master#{u}
git rev-list --left-right master...origin/master
git for-each-ref --format %(refname) %(objectname)
git remote --verbose
git show :models/genre.js
after vscode commited the changes you need to push it from terminal
I want to sync my code to my github repo, so anytime I update my code it should be updated in the repo. Is there any proper and structured way of doing this.
So this is how I am doing it now
1
$ cd my-project
$ git init
$ git remote add origin GITHUB_URL
$ git pull origin master
$ git status
$ git add .
$ git commit -m "Init repo."
$ git push -u origin master
then just repeat following steps
$ git add .
$ git commit -m "Init repo."
$ git push -u origin master