Adding a Git Baselibs Component: Difference between revisions
m Copied from Updating a Git Baselibs Component, revision 4103 |
Updates up to the Main Repo |
||
Line 1: | Line 1: | ||
== | == Adding a Git Baselibs Component Steps == | ||
This will use | This will use gFTL as an example. | ||
=== | === Create a new repository === | ||
On the developer Github, create a new repository named <tt>ESMA-Baselibs-gFTL</tt>. | |||
=== Make directory and initialize === | |||
On your desktop, make the directory: | |||
$ | $ mkdir ESMA-Baselibs-gFTL | ||
$ git | $ cd ESMA-Baselibs-gFTL | ||
$ git init | |||
=== | === Copy over source code and commit === | ||
$ rsync -avi --delete --exclude '.gitignore' --exclude '.git' /ford1/share/gmao_SIteam/Baselibs/Submodules/gFTL-1.0.1/ /ford1/share/gmao_SIteam/Baselibs/Submodules/ESMA-Baselibs-gFTL/ | |||
$ git add . | |||
$ git commit -m "Add source for gFTL 1.0.1" | |||
$ git remote add origin git@developer.nasa.gov:mathomp4/ESMA-Baselibs-gFTL.git | |||
$ git push -u origin master | |||
$ rsync -avi --exclude '.gitignore' --exclude '.git' /ford1/share/gmao_SIteam/Baselibs/Submodules/ | |||
=== Create vendor branch === | |||
For future use, create the vendor branch now: | |||
$ git checkout -b vendor | |||
$ git tag -a vendor/1.0.1 -m "Tag vendor/1.0.1" | |||
$ git | |||
$ git tag -a vendor/ | |||
If you need to check things out, run <tt>tig</tt> to verify: | If you need to check things out, run <tt>tig</tt> to verify: | ||
Line 47: | Line 34: | ||
$ tig --all | $ tig --all | ||
=== | === Push our changes === | ||
$ git checkout master | $ git checkout master | ||
$ git push --all | $ git push --all | ||
$ git push --tags | $ git push --tags | ||
Line 65: | Line 46: | ||
Because the .gitmodules file that submodules works with only accepts branches, we create a "fake" version branch, push it, and do a normal tag: | Because the .gitmodules file that submodules works with only accepts branches, we create a "fake" version branch, push it, and do a normal tag: | ||
$ git branch version/ | $ git branch version/1.0.1 | ||
$ git push origin version/ | $ git push origin version/1.0.1 | ||
$ git tag -a | $ git tag -a 1.0.1 -m "Tag version 1.0.1" | ||
$ git push --tags | $ git push --tags | ||