Skip to content

Instantly share code, notes, and snippets.

@mashirozx
Created June 11, 2020 13:21
Show Gist options
  • Save mashirozx/e36b0f47e19afa4311c1994a2a8bc595 to your computer and use it in GitHub Desktop.
Save mashirozx/e36b0f47e19afa4311c1994a2a8bc595 to your computer and use it in GitHub Desktop.
git submodule update
root@ubuntu-shanghai:~/mtb#  git clone git@github.com:wecodebolivia/adamsubmoduleupdate.git -b staging --recursive
Cloning into 'adamsubmoduleupdate'...
remote: Enumerating objects: 7, done.
remote: Counting objects: 100% (7/7), done.
remote: Compressing objects: 100% (4/4), done.
remote: Total 7 (delta 0), reused 0 (delta 0), pack-reused 0
Receiving objects: 100% (7/7), done.
Submodule 'mashirozx/odoo_mrp_sale_info' (git@github.com:mashirozx/odoo_mrp_sale_info.git) registered for path 'mashirozx/odoo_mrp_sale_info'
Cloning into '/root/mtb/adamsubmoduleupdate/mashirozx/odoo_mrp_sale_info'...
remote: Enumerating objects: 41, done.
remote: Counting objects: 100% (41/41), done.
remote: Compressing objects: 100% (14/14), done.
remote: Total 41 (delta 25), reused 41 (delta 25), pack-reused 0
Receiving objects: 100% (41/41), 18.79 KiB | 8.00 KiB/s, done.
Resolving deltas: 100% (25/25), done.
Submodule path 'mashirozx/odoo_mrp_sale_info': checked out 'c9fd40e2123f4e9bc163f247814eae628fac1a68'
root@ubuntu-shanghai:~/mtb# cd adamsubmoduleupdate
root@ubuntu-shanghai:~/mtb/adamsubmoduleupdate# l
mashirozx/  README.md
root@ubuntu-shanghai:~/mtb/adamsubmoduleupdate# cd mashirozx/
root@ubuntu-shanghai:~/mtb/adamsubmoduleupdate/mashirozx# l
odoo_mrp_sale_info/
root@ubuntu-shanghai:~/mtb/adamsubmoduleupdate/mashirozx# cd odoo_mrp_sale_info/
root@ubuntu-shanghai:~/mtb/adamsubmoduleupdate/mashirozx/odoo_mrp_sale_info# l
i18n/  __init__.py  __manifest__.py  models/  README.rst  static/  views/
root@ubuntu-shanghai:~/mtb/adamsubmoduleupdate/mashirozx/odoo_mrp_sale_info# cd ..
root@ubuntu-shanghai:~/mtb/adamsubmoduleupdate/mashirozx# cd odoo_mrp_sale_info/
root@ubuntu-shanghai:~/mtb/adamsubmoduleupdate/mashirozx/odoo_mrp_sale_info# nano __manifest__.py
root@ubuntu-shanghai:~/mtb/adamsubmoduleupdate/mashirozx/odoo_mrp_sale_info# git submodule update
root@ubuntu-shanghai:~/mtb/adamsubmoduleupdate/mashirozx/odoo_mrp_sale_info# git pull
You are not currently on a branch.
Please specify which branch you want to merge with.
See git-pull(1) for details.

    git pull <remote> <branch>

root@ubuntu-shanghai:~/mtb/adamsubmoduleupdate/mashirozx/odoo_mrp_sale_info# git pull master
fatal: 'master' does not appear to be a git repository
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
root@ubuntu-shanghai:~/mtb/adamsubmoduleupdate/mashirozx/odoo_mrp_sale_info# git checkout master
Previous HEAD position was c9fd40e first commit
Switched to branch 'master'
Your branch is up to date with 'origin/master'.
root@ubuntu-shanghai:~/mtb/adamsubmoduleupdate/mashirozx/odoo_mrp_sale_info# git pull
Already up to date.
root@ubuntu-shanghai:~/mtb/adamsubmoduleupdate/mashirozx/odoo_mrp_sale_info# git fetch
root@ubuntu-shanghai:~/mtb/adamsubmoduleupdate/mashirozx/odoo_mrp_sale_info# git pull
Already up to date.
root@ubuntu-shanghai:~/mtb/adamsubmoduleupdate/mashirozx/odoo_mrp_sale_info# l
i18n/  __init__.py  __manifest__.py  models/  README.rst  static/  views/
root@ubuntu-shanghai:~/mtb/adamsubmoduleupdate/mashirozx/odoo_mrp_sale_info# nano __manifest__.py
root@ubuntu-shanghai:~/mtb/adamsubmoduleupdate/mashirozx/odoo_mrp_sale_info# cd ..
root@ubuntu-shanghai:~/mtb/adamsubmoduleupdate/mashirozx# cd ..
root@ubuntu-shanghai:~/mtb/adamsubmoduleupdate# git submodule foreach git pull origin master
Entering 'mashirozx/odoo_mrp_sale_info'
From github.com:mashirozx/odoo_mrp_sale_info
 * branch            master     -> FETCH_HEAD
Already up to date.
root@ubuntu-shanghai:~/mtb/adamsubmoduleupdate# git commit -am "update mashirozx/odoo_mrp_sale to 9.0.1.0.5"
[staging 5f432ae] update mashirozx/odoo_mrp_sale to 9.0.1.0.5
 1 file changed, 1 insertion(+), 1 deletion(-)
root@ubuntu-shanghai:~/mtb/adamsubmoduleupdate# git checkout
Your branch is ahead of 'origin/staging' by 1 commit.
  (use "git push" to publish your local commits)
root@ubuntu-shanghai:~/mtb/adamsubmoduleupdate# git push
Counting objects: 3, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (3/3), 315 bytes | 315.00 KiB/s, done.
Total 3 (delta 1), reused 0 (delta 0)
remote: Resolving deltas: 100% (1/1), completed with 1 local object.
To github.com:wecodebolivia/adamsubmoduleupdate.git
   c02474c..5f432ae  staging -> staging
root@ubuntu-shanghai:~/mtb/adamsubmoduleupdate#
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment