Thursday 21 June 2018

git standalone developer tips



git branch --no-merged master


See if any branches are not merged with master.



Individual Developer standalone working :



 Use a tarball as a starting point for a new repository.


               $ tar zxf frotz.tar.gz
               $ cd frotz
               $ git init
               $ git add . (1)
               $ git commit -m "import of frotz source tree."
               $ git tag v2.43 (2)

           1. add everything under the current directory.
           2. make a lightweight, unannotated tag.

       Create a topic branch and develop.

               $ git checkout -b alsa-audio (1)
               $ edit/compile/test
               $ git checkout -- curses/ux_audio_oss.c (2)
               $ git add curses/ux_audio_alsa.c (3)
               $ edit/compile/test
               $ git diff HEAD (4)
               $ git commit -a -s (5)
               $ edit/compile/test
               $ git diff HEAD^ (6)
               $ git commit -a --amend (7)
               $ git checkout master (8)
               $ git merge alsa-audio (9)
               $ git log --since='3 days ago' (10)
               $ git log v2.43.. curses/ (11)

           1. create a new topic branch.
           2. revert your botched changes in curses/ux_audio_oss.c.
           3. you need to tell Git if you added a new file; removal and
           modification will be caught if you do git commit -a later.
           4. to see what changes you are committing.
           5. commit everything, as you have tested, with your sign-off.
           6. look at all your changes including the previous commit.
           7. amend the previous commit, adding all your new changes, using
           your original message.
           8. switch to the master branch.
           9. merge a topic branch into your master branch.
           10. review commit logs; other forms to limit output can be combined
           and include -10 (to show up to 10 commits), --until=2005-12-10,
           etc.
           11. view only the changes that touch what's in curses/ directory,
           since v2.43 tag.




No comments:

Post a Comment