hg init
or git init
...are generally the first commands I use.
Have your code ready and a reasonable directory structure in place.
Add a README and a LICENSE file (OSI approved licenses in my case)
hg init
...and you are up and running (for your git stuff
git init
)If you are working from an existing codebase then you might want 'clone'
hg clone http://hg.savannah.nongnu.org/hgweb/someproject
Publishing one time projects via git lends itself well to a set recipe:
- git init
- git add .
- git commit -m 'first commit of GPL3 licensed python scripts'
- git remote add origin git@github.com:someuser/apt-utils-python-shell.git
- git push -u origin master
[ Above we used -u switch (--set-upstream) which is correct ] - git add README
- git commit -m 'added some to README'
- git push origin master
[ Note there is no -u switch here which is correct ]
Openshift and git - what commands there?
In order to commit to your new project, ...
Make your changes, then run:
git commit -a -m 'Some commit message' git push
Then reload this page
Note: The above is quoted from the openshift page
Notes and further reading:
If you feel the desire to host your own Mercurial from which other folks can pull, then:
hg serve
and the point browser at http://localhost:8000/
Note: If your machine is internet facing rather than on a private company network, then you should think about authentication / security, and follow this guide:
Setting up a Mercurial CGI server
Alternatively you could think about Trac
If you feel the desire to host your own Git from which other folks can pull, then:
git-daemon
and the point browser at http://localhost:9418/
Note: If your machine is internet facing rather than on a private company network, then you should think about authentication / security, and read up about gitosis or gitweb.
- Openshift repo at Red Hat
- Openshift tutorial videos [ openshift.redhat.com ]
- Openshift - sync local git repo with remote 'express' repo
1 comment:
hg rollback
to revert changes that have been commited to the local repository but not been pushed to another repository yet.
You can only rollback the last hg command.
hg revert - when to use
Post a Comment