1

I have Git installed on my Windows machine, I've used it for quite some time without any problems.

But recently, many changes I do in my project do not show up.

I have a folder called "Project", I create a copy of it called "Project 2" and do all my changes locally. When it's working fine, I copy all files back to "Project" and do a Commit.

I've worked like that for a long time, but recently it isn't catching most of my changes. What can I do? How does Git identifies what changed between this and the last commit?

PS: I'm using GitHub for Windows + Git Extensions. I have the Git Bash installed as well (command line).

Lucas Bustamante
  • 15,821
  • 7
  • 92
  • 86
  • Can you try to figure out a pattern as to which changes show up and which don't? – Joseph Sible-Reinstate Monica Mar 13 '17 at 03:11
  • Hey buddy, thanks for being helpful. I've compared "Project" and "Project 2" with WinMerge and saw they were exactly the same. So I reviewed all my changes and saw they were indeed reflected on the original Project folder. I don't know how that happened, and I'll keep an eye out for the answer in the next couple days. Thanks a lot. – Lucas Bustamante Mar 13 '17 at 03:15
  • Just saw a problem: Even if "Project" is equal to "Project 2", it indeed didn't uplodaded the recent changes to the Git itself. I think I'll delete the whole thing in my local computer, download a fresh copy from Github and do the Commit again. – Lucas Bustamante Mar 13 '17 at 03:23
  • But... but why do you copy the whole folder? The great thing about VCS in general and git in particular is that you can change things without the fear to break anything, because it allows you to go back to where you started at any time. Just create a new branch with `git branch backup_branch` before you start changing things and you can go back there whenever you want. – kowsky Mar 13 '17 at 05:10
  • You no need to delete every time and checkout freshly, if any changes to `project` should reflect when you check git status, if not check anything did you added in .gitignore file. – ntshetty Mar 13 '17 at 05:27

1 Answers1

0

The best way to create a Project2 is by cloning the GitHUb repo again in another folder.

git clone https://github.com/username/reponame Project2

Or, still from command-line, you can checkout your original Project repo from a different branch in a different folder, with git worktree.

Once you have done that, you can use GitHub Desktop again.

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250