Download Scott Chacon
Transcript
C H A P T E R 2 N G I T B A S I C S Sharing Tags By default, the ceplqod command doesn’t transfer tags to remote servers. You have to explicitly push tags to a shared server after you create them. This process is just like sharing remote branches—you can run ceplqodknecejWp]cj]iaY: ceplqodknecejr-*1 ?kqjpejck^fa_po61,(`kja* ?kilnaooejck^fa_po6-,,!$/4+/4%(`kja* Snepejck^fa_po6-,,!$00+00%(0*12Ge>(`kja* Pkp]h00$`ahp]-4%(naqoa`4$`ahp]-% Pkcep<cepdq^*_ki6o_d]_kj+oeilhacep*cep &Wjasp]cYr-*1):r-*1 If you have a lot of tags that you want to push up at once, you can also use the ))p]co option to the ceplqod command. This transfers to the remote server all of your tags that aren’t already there: ceplqodknecej))p]co ?kqjpejck^fa_po61,(`kja* ?kilnaooejck^fa_po6-,,!$/4+/4%(`kja* Snepejck^fa_po6-,,!$00+00%(0*12Ge>(`kja* Pkp]h00$`ahp]-4%(naqoa`4$`ahp]-% Pkcep<cepdq^*_ki6o_d]_kj+oeilhacep*cep &Wjasp]cYr,*-):r,*&Wjasp]cYr-*.):r-*. &Wjasp]cYr-*0):r-*0 &Wjasp]cYr-*0)hs):r-*0)hs &Wjasp]cYr-*1):r-*1 Now, when someone else clones or pulls from your repository, they will get all your tags as well. Tips and Tricks Before I finish this chapter on basic Git, a few little tips and tricks may make your Git experience a bit simpler, easier, or more familiar. Many people use Git without using any of these tips, and I won’t refer to them or assume you’ve used them later in the book; but you should probably know how to do them. Auto-Completion If you use the Bash shell, Git comes with a nice auto-completion script you can enable. Download the Git source code, and look in the _kjpne^+_kilhapekj directory; there should be a file called cep)_kilhapekj*^]sh. Copy this file to your home directory, and add this to your *^]odn_ file: okqn_az+*cep)_kilhapekj*^]od 43