views:

39

answers:

3

So, i decided to try git as my first vcs. There's actually no serious need(i'm a single developer of the project), just for self-education. I can't find out, how do you properly keep remote up-to-date. Do I really need to rm each file I delete at he local, to delete it from remote? Can it just look which files are missing at local repo and delete those from the remote?

+1  A: 

Git's great for single developers, too!

From your app's dir (where is your git repo)

git add .
git commit -m "some release info"
git push origin master

So, you need to make a commit (i.e. a check-point of your code) in order to sync.

Note: Actually, have you initialized your git repo at all?

Albus Dumbledore
Yes, and I've finally got my remote up and running on github. But it seems that git add . command just add new files, but doesnt include information about files, i've deleted, to the commit.
creitve
You do need to do git rm. Or look at `git commit -a`.
Alex Feinman
Oh, got it, thanks!
creitve
Happy to say all i need is just -a key as you said.)
creitve
You might want to have a look at these: [Removing sensitive data](http://help.github.com/removing-sensitive-data/), [Git Cheat Sheet](http://github.com/guides/git-cheat-sheet)
Albus Dumbledore
+2  A: 

Git as a first VCS may be a little complicated since it is a Distributed VCS.

To get more familiar with VCS, you could try Subversion for example : there is no local repo, so the commit operations are easier to understand.

On git, to get remote repository synchronized with your local repository, you have to call the "git push" command. Every change commited in your local repository (file modified, renamed, deleted) will be reported on the remote repository.

To learn git concept, you should start with some tutorials.

Benoit Courtine
I don't really see why you're suggesting learning subversion. There are a wide variety of reasons to prefer git, and subversion users always have a hard time with get because they're stuck with its way of thinking.
Jefromi
I agree (I came to Git from SVN). But I suggest that since I think that centralized VCS way of thinking is easier to understand (personnal opinion).Centralized VCS are still very used (and probably for a long time), so learning how to use them first is probably not a waste of time.
Benoit Courtine
Thanks a lot, i finished "Git magic" and understood a bit. Just when it says I need to merge smth in order to push it's getting complicated a bit. But I think i'll manage finally, thanks for the reply!
creitve
+3  A: 

I don't think to understand your question, but I really suggest you to read Understanding Git Conceptually

It clarify you how the whole "cloud" works.

Enrico Carlesso
Thanks a lot, i'll read.
creitve