0

I have just switched from subversion to GIT and found out it is much faster.

I have a problem - on one location / computer I change file, delete dir,... and commit it Everything is OK (If I define new GIT on another folder everything is correct). On another location I pull and nothing happens - deleted files stays, no changes is made etc...

Anyone have any idea?

M.V.
  • 1,662
  • 8
  • 32
  • 55

3 Answers3

4

commit only commits to your local repository. I think you are looking for push to send it to the main repo?

See: What are the differences between "git commit" and "git push"? for a great diagram explaining how Git works.

Obviously this is different to what you are used to, whereby there is only one centralized repository; now you have your own local repo, hence Git being a distributed system...also partially why it is so much faster for you!

Community
  • 1
  • 1
KingCronus
  • 4,509
  • 1
  • 24
  • 49
2

While it is not an answer to your specific question, I would suggest this link:

Git Tutorial

for review. The author of the page (Lars Vogel) put together a very good beginner's guide to Git, and when I can't remember a specific option/parameter for what I am trying to do, this is what I 99% of the time refer to for help. For working with remote repos, you'll want to read through sections 11 and 12, but being new to Git, I would say give the entire document a read.

I would have to review NetBeans to see how their Git plug-in works; it may not support the push to a remote repository (local commits only), but that would surprise me. I rarely work in an IDE that supports Git, so more often than not, my commits are done at the command-line.

Will
  • 3,500
  • 4
  • 30
  • 38
1

If you want like "your post say" to change your git remote repository on localhost you need to do this:

First you need to see your actual repository with this:

git remote -v

Then you need to set your new repository url:

git remote set-url <name> <newurl> 

Example:

git remote set-url origin http://newserver/myproject.git 

You can see the change with this command again:

git remote -v

That's all...

Anthony Piñero
  • 616
  • 5
  • 10