Reputation: 57118
I'm brand new to Git. Could somebody give me a rundown of the typical process of using Git to work with an existing repository for my employer (or confirm that my understanding is not way off base). (notes: Windows XP, GitHub, Cheetah Shell)
My current understanding is:
1) # Create directory called "someprojectsrc"
2) # Move into my new directory
3) git clone [email protected]:someprojectsrc.git
4) git branch foobranch
5) git checkout foobranch
6) # Using my text editor, add new files, edit existing files, etc
7) git add my_file my_other_file
8) git rm unneeded_file
9) git commit -m "Made some changes to XYZ, etc"
10) git push
11) # Manager pulls my branch and merges it with master, then pushes master?
I assume this is the process is for working on repository as part of a team. Am I missing anything? Also, does a developer typically have commit
permissions to a large corporate repository? Does it work such that the manager can commit to master and other users can commit to branches that they create, or do you typically have to submit a patch somehow, and they somehow merge your patch into master?
Upvotes: 1
Views: 155
Reputation: 1920
I recommend you read this Guide for using Git on Windows
If you move one step further, reading this awesome Git Branching Model will improve your team's effectivity.
Upvotes: 3
Reputation: 760
In step 7, the comma (,
) is not right. Only spaces should be used for parameters separation.
The way I use git is with remote
s. Instead of doing a checkout
, I add remote
sources like this:
git remote add origin [email protected]:someproject.git
and then perform push
like this:
git push origin master # given that you're on the 'master' branch
The whole idea would be:
1) # Create someproject dir
2) # Change to someproject
3) git init
4) git remote add origin [email protected]:someproject.git
# ... changes ...
5) git commit -m 'My commit message'
6) git push origin master
Upvotes: 1