git pull is a shortcut for git fetch && git merge origin/CURRENT_BRANCH_HERE in case you weren't aware. On Apr 18, 2012 1:08 PM, "Mike Caron" <caron.m...@gmail.com> wrote:
> The thing to remember about git is that it's all about branches. You > are always on a branch, usually called master (but that varies, of > course). So, I will use master as the branch name below. > > To update your repo, you need to do this: > > git fetch #pulls changes from "origin" > git merge origin/master #updates working copy > > To commit changes, you just need to do this: > > git add path/to/file #adds a file > git add -u #adds all changed files > git add -a #adds all non-ignored files > git commit -m "your message goes here" > > (obviously, pick whatever add command is most appropriate) > > Lastly, to push your changes back to origin, just do this: > > git push origin master > > (if your branch is not up to date, you will need to refresh it as above) > > That's all you need to know to get started. However, I strongly > suggest you learn git's branching mechanics, because they are really > powerful and really useful. At my work, we use a branch per > ticket/bugfix, and it works beautifully. > > Sent from my iPad > > On 2012-04-18, at 12:56 PM, James Paige <b...@hamsterrepublic.com> wrote: > > > I figure if I am ever going to learn to use git, I need to learn how to > > replicate my existing svn usgae patterns with git. I have been told many > > times that git's functionality is a superset of svn's so this should be > > no problem. > > > > My trouble is that every tutorial I can find, even the ones that are > > supposedly intended for recent converts from svn seem to want me to jump > > right in to gits more advanced features, and discard my old workflows. > > > > I would much rather first get used to using git exactly thew same way I > > use svn, and then when I am confortable with that, I can start learning > > the new fancy things that make git special. > > > > I have two different workflows for svn repositories > > > > 1) I have read only access, and I am not changing anything. All I want > > to do is keep my local copy up-to-date with upstream. With svn I just > > do: > > > > svn cleanup > > svn update > > > > in a cron job, and all is happy. However, I am not clear on how to do > > this in git. I assume it is simple, but I get confused when I search for > > "git equivalent for svn update" and every single search result tells me > > something different, and none of them are trying to do the uber-simple > > case that I care about anyway. > > > > 2) Committing my local changes back to a remote server. This is what I > > would want to do if I was working on the ohrrpgce using git. I know I > > that local branches are a big deal with git, and that disconnected > > operation without an internet connection is a big deal with git, but for > > my purposes I want to treat a centralized repsitory on a server as the > > master, and use it to sync any assorted workstations I might happen to > > be sitting in front of at the moment. > > > > --- > > James, Curious > > _______________________________________________ > > Ohrrpgce mailing list > > ohrrpgce@lists.motherhamster.org > > http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org > _______________________________________________ > Ohrrpgce mailing list > ohrrpgce@lists.motherhamster.org > http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org >
_______________________________________________ Ohrrpgce mailing list ohrrpgce@lists.motherhamster.org http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org