GIT学习笔记
发布日期:2021-05-10 05:03:32 浏览次数:14 分类:精选文章

本文共 5032 字,大约阅读时间需要 16 分钟。

������������

Git ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������ Git ���������

  • ������������������ git init ������������������������ Git ���������
  • $ git init repo_name

    ������������������������������������ Git ���������������������������������������

    1. ������������������������ Git ���������������������������������������������
    2. $ git clone from [to]
      • from ������������������������������������������
      • ������������������ [to] ��������������������������������������������� from ������������������������
      1. ������������������������������������������������������������
      2. $ git remote

        ������������������������������������ -v ���������

        $ git remote -v
        1. ������������������������������������������������������������
        2. $ git remote show origin
          1. ���������������������������������������������������������������������������
          2. $ git remote add custom_name repo_url

            ��������� custom_name ��������������������������������������������������������������������� repo_url ���������������������������

            1. ������������������������������������������������������������������������
            2. $ git remote rm origin_name

              ������������������������������������������������������������������������������������������������������������

              ������������

              ������������������������������������������������������������ Git ���������

            3. ������������������������������ Git ���������������
            4. $ git add file_name

              ��������������������������������� Git ������������������������������������������������������������������

              1. ��������������� Git ���������������������������������������
              2. $ git rm file_name

                ��������������������������������������������������������������������� -f ���������

                $ git rm -f file_name

                ������������������������ git rm --cached file_name ������������������������������������������������������������

                1. ���������������������������������������������������
                2. $ git reset HEAD file_name

                  ������������������������ file_name ������������

                  1. ���������������������������������������������������
                  2. $ git checkout -- file_name
                    1. ��������������������������������������������� Git ���������
                    2. $ git commit

                      ��������������������������������������� -m ���������

                      $ git commit -m "������������"``��������������������������������������������������������������������### ������������Git ��������������������������� commit ������������������������������������������������������������������������1. **������������**������������������������������```bash$ git tag

                      ������������������������������������������������������

                      $ git show tag_name
                      1. ������������������������������������������������
                      2. $ git tag tag_name

                        ���������������������������������

                        $ git tag -a tag_name -m "������������"
                        1. ���������������������������������
                        2. $ git tag -d tag_name
                          1. ���������������������������������������������
                          2. $ git push origin tag_name

                            ������������������������������������������������������ -���tags ���������

                            $ git push -���tags
                            1. ���������������������������������������������������������
                            2. $ git ls-remote --tags

                              ������������

                              Git ���������������������������������������������������������������������������������������������������������

                            3. ������������������������������������������������
                            4. $ git branch

                              ������ -a ������������������������������������������

                              $ git branch -a
                              1. ���������������������������������������������������������������
                              2. $ git branch branch_name

                                ���������

                                $ git checkout -b branch_name
                                1. ������������������������������������������������������
                                2. $ git checkout a$ git merge b
                                  1. ���������������������������������������������
                                  2. $ git branch -d branch_name

                                    ������������������������������������������������������������������������������������

                                    $ git branch -D branch_name
                                    1. ���������������������������������������������������������
                                    2. $ git push branch_name origin branches/branch_name

                                      ���������������������������������������������������������������

                                      $ git remote add origin http://remote_repositoryurl.git
                                      1. ���������������������������������������������������������
                                      2. $ git push branch_name origin branches/branch_name
                                        1. ���������������������������������������������������������������
                                        2. $ git checkout -b local_branch_name origin/remote_branch_name
                                          1. ������������������������������������������������������
                                          2. $ git push origin --delete origin_branch_name

                                            ������������

                                            ������Git������������������������

                                            $ git log

                                            ������ -p ������������������������������

                                            $ git log -p

                                            ������������������������

                                            $ git log -n

                                            ������������������������������������������������������������������

                                            $ git log --author "John Doe"

                                            Markdown������

                                            Git ���������������������������������������������-face book-flavored Markdown ������������������

                                            Markdown ��������������������������������������������������������������������������������������� Git ��������������� .md ��������������������� Markdown ������������������������������������������������������������������

                                            ������

                                            ������������������ Git ���������������������������������������������������������������������������������������������������������Git ������������������������������������������������������������������������

    上一篇:三种方法在ROS中加载Qt库进行GUI设计
    下一篇:OpenCV,Qt,ROS学习笔记

    发表评论

    最新留言

    第一次来,支持一个
    [***.219.124.196]2025年04月24日 16时28分04秒