6

Basically I changed a few files in Notepad++ but it wont show up in Github for Windows.

gif

I have tried reinstalling, Restarting pc and constantly re-cloning into different parts on my pc.

Nothing seems to do anything

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
Shiny
  • 105
  • 2
  • 2
  • 7

2 Answers2

9

Check in command line if you have a .gitignore rule that ignores those changes

cd /path/to/my/repo
git check-ignore -v -- afile

It can be a local .gitignore, or a global one.

The other possibility is if you are in a detached HEAD.
Check the output of git branch.

Finally, check again how to work with a local repo with GitHub Desktop: the comments below show that:

git status
git add . 
git commit -m "add changes"

All this work as expected from command line.

The OP Shiny adds in the comments:

Seems like a bug I need to report to Github, But basically I set my username of my PC to "{Shiny}" and it seems if "{}" is in the path it glitches it out.

That is why I always recommend starting with simpler path: C:\git\myrepo, just to validate that it works there.

Brandon Essler
  • 710
  • 8
  • 21
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • I dont have any .gitignore at all – Shiny Jul 09 '16 at 05:16
  • @Shiny It does not matter: execute that command anyway, it can be a global one. – VonC Jul 09 '16 at 05:17
  • ok, I did: git check-ignore -v -- README.md nothing was returned. – Shiny Jul 09 '16 at 05:19
  • @Shiny Make sure to use the latest git (https://github.com/git-for-windows/git/releases/download/v2.9.0.windows.1/PortableGit-2.9.0-64-bit.7z.exe for Windows for instance) – VonC Jul 09 '16 at 05:19
  • @Shiny Do you have at least one commit in your current repo? git log returns anything? – VonC Jul 09 '16 at 05:20
  • Yes I have 106 xD No idea where the Git Log is. – Shiny Jul 09 '16 at 05:20
  • @Shiny All you need to do is typing `git log`. – VonC Jul 09 '16 at 05:21
  • @Shiny that is your problem right there. What `git branch` returns? – VonC Jul 09 '16 at 05:22
  • master as usual "*master" to be exact – Shiny Jul 09 '16 at 05:24
  • But `git log` returns nothing? Strange. What does `git remote -v` returns? – VonC Jul 09 '16 at 05:25
  • git log returns stuff but nothing to do with what ive done only old commits – Shiny Jul 09 '16 at 05:26
  • it returns: origin https://github.com/ShinyMK/JKSMK.git (fetch) origin https://github.com/ShinyMK/JKSMK.git (push) – Shiny Jul 09 '16 at 05:27
  • @Shiny Ok. What `git status` returns? – VonC Jul 09 '16 at 05:27
  • On branch master Your branch is up-to-date with 'origin/master'. Changes not staged for commit: (use "git add ..." to update what will be committed) (use "git checkout -- ..." to discard changes in working directory) modified: README.md Untracked files: (use "git add ..." to include in what will be committed) README - Copy.md no changes added to commit (use "git add" and/or "git commit -a") – Shiny Jul 09 '16 at 05:29
  • It also seems to be constantly doing this blue loading thing that u see in the .gif. not sure if its normal to be constantly doing that – Shiny Jul 09 '16 at 05:30
  • @Shiny So in command line, the status is coherent: a `git diff` should show you the diff in progress, a `git add` and `git commit` should allow you to record those changes? – VonC Jul 09 '16 at 05:33
  • The difference is being shown with git diff yes. Gonna try the other 2 commands now – Shiny Jul 09 '16 at 05:35
  • @Shiny `git add .` (see the space dot there) and `git commit -m "Add changes"` – VonC Jul 09 '16 at 05:36
  • tried using the other 2 commands but I have no idea how it would work. But it is detecting the modified files - EDIT: Just saw ur comment. That worked. Github for Desktop (GUI) still doesnt seem to be working. – Shiny Jul 09 '16 at 05:38
  • @Shiny That seems to be a usage issue with GitHub for Desktop, then. Try and see if you can follow https://help.github.com/desktop/guides/contributing/adding-a-repository-from-your-local-computer-to-github-desktop/ – VonC Jul 09 '16 at 05:43
  • @Shiny Also, from command line, you can do a `git push`. That will update the remote repo with your changes. – VonC Jul 09 '16 at 05:43
  • The repository using that way seems to add fine. But again doesnt seem to fix the issue :/ – Shiny Jul 09 '16 at 05:46
  • @Shiny Yes, try again to clone that repo with GitHub Desktop in a new folder, and try again to modify files in that local folder, to see if GitHub Desktop picks up the changes. – VonC Jul 09 '16 at 06:05
  • Making changes from Git Bash works fine using the commands u have provided me. But again still it doesnt show changed files in the GUI itself – Shiny Jul 09 '16 at 06:11
  • @Shiny Yes, hence the suggestion to try again in a new local folder created by GitHub Desktop when cloning a remote repo, as in https://help.github.com/desktop/guides/contributing/cloning-a-repository-from-github-desktop/ – VonC Jul 09 '16 at 06:13
  • Yes I tried doing that already in Desktop, Documents (GitHub Folder), Documents (Projects Folder). Still not working – Shiny Jul 09 '16 at 06:16
  • @Shiny `GitHub Desktop` is the name of the GitHub GUI. It has nothing to with the local folder you chose to clone your repo to. Try cloning in a simple path (`C:\git\myrepo`), then follow https://help.github.com/desktop/guides/contributing/adding-a-repository-from-your-local-computer-to-github-desktop/ – VonC Jul 09 '16 at 06:18
  • Oh wow, Now I know why its not working, Seems like a bug I need to report to Github, But basically I set my username of my PC to "{Shiny}" and it seems if "{}" is in the path it glitches it out xD – Shiny Jul 09 '16 at 06:29
  • @Shiny Well done, and well spotted! I have included your comment in the answer for more visibility. – VonC Jul 09 '16 at 06:32
-2

save file in vscode , then try to see the changes in the github desktop , there u might be able to the changes . Also make sure to reinstall git and git hub if the problem still persists .