feat(unitproc/bktemp-initGitRepo):Fetch remote branches after pull
authorSteven Baltakatei Sandoval <baltakatei@gmail.com>
Thu, 14 Oct 2021 01:00:20 +0000 (01:00 +0000)
committerSteven Baltakatei Sandoval <baltakatei@gmail.com>
Thu, 14 Oct 2021 01:00:20 +0000 (01:00 +0000)
unitproc/bktemp-initGitRepo

index 3e4b5663c65314c2d72ba9cf588a9f4d91874c65..911a63c3bde38c621cb2ed7a47ee6f992cc891e9 100644 (file)
@@ -31,7 +31,7 @@ initGitRepo() {
     #        arg2: repoDir
     #        arg3: remoteName
     #        arg4: branchName
-    # Version: 0.0.7
+    # Version: 0.0.8
     # Depends: checkURL() 0.0.2, yell(), Bash 5.0.3
     # Ref/Attrib: [1]: Test for space-less alphanuemric string. https://unix.stackexchange.com/a/416120
     #             [2]: Test for argument count. https://stackoverflow.com/q/18568706
@@ -77,6 +77,7 @@ initGitRepo() {
     git remote add "$remoteName" "$repoURL";
     yell "STATUS:Pulling branch $branchName from remote $remoteName";
     git pull --ff-only "$remoteName" "$branchName";
+    git fetch "$remoteName";
     unset repoURL repoDir remoteName branchName;
     popd || exit 1;
     #==END create and populate git repository==