actionport.blogg.se

Git submodule set branch
Git submodule set branch








git submodule set branch
  1. GIT SUBMODULE SET BRANCH UPDATE
  2. GIT SUBMODULE SET BRANCH CODE

GIT SUBMODULE SET BRANCH UPDATE

$ git submodule update –recursive –remote git status reporting detached HEAD

git submodule set branch

The very first time you attempt an update, and then use:Īdding the option -remote has the added benefit of respecting any “non default” branches specified in the. The latter command has the advantage of also including nested submodules if any of the submodules in the repository have submodules themselves.įor later versions of git (1.8.2 or above) the recommendation is to use the command $ git submodule foreach git pull origin main Or, if all submodules point towards the branch origin main If the command identifies only fast-forward mergers you can use another foreach command to pull all the changes made in the origins of each submodule Your branch is up to date with 'origin/main'. (use "git pull" to update your local branch) Your branch is behind 'origin/main' by 1 commit, and can be fast-forwarded. $ git status Identify repo and branch of a submoduleĬd to the submodule folder (not necessarily the same name as you can use an alias). If you again inspect the content of the repo, you will find that the submodules are filled up with their respective original content. As outlined above, you need to run two commands to retrieve the submodules (run the commands from the top directory of the cloned superproject): If you inspect the content of the cloned repo, you will discover that the submodules are represented as empty directories. The cloning will normally take only a few seconds, as you are only retrieving an empty shell at this stage. Write the command git clone and paste in the string that you copied from the online repo. Start a Terminal session and change directory ( cd) to the parent folder where you want to clone the Framework. Click the copy sign to the right of the text to copy.

GIT SUBMODULE SET BRANCH CODE

To clone the Framework, go the GitHub repo, click the green Code button and select the HTTPS alternative. Karttur’s GeoImagine Framework is available as a git superproject at. To retrieve also the submodule content you must run two additional commands: git submodule init to initialize the local configuration, and git submodule update to fetch all the data for the submodules. When you clone such a project, by default you get the directories that contain submodules, but none of the files within. We will start the hands-on exercise by cloning a GitHub repo (superproject) with submodules. It is required for the more advanced submodule management, including as outlined in this post. The git submodule init command prepares the local repo configuration for submodule processing. Gitlab runner with the Kubernetes Executor. From ************/test/mymodule * branch 31d631ca35bad5f5b9647500f3a7604b70501542 -> FETCH_HEAD Submodule path 'mymodule': checked out '31d631ca35bad5f5b9647500f3a7604b70501542' Entering 'mymodule' Entering 'mymodule' Executing "step_script" stage of the job script 00:01 $ cd mymodule $ git checkout dev error: pathspec 'dev' did not match any file (s ) known to git Cleaning up file based variables 00:00 ERROR: Job failed: command terminated with exit code 1 Environment description Submodule 'mymodule' *************/test/mymodule.git ) registered for path 'mymodule' Cloning into '/builds/ZNjBtxc3/0/test/test/mymodule'. Updating/initializing submodules recursively with git depth set to 50. Initialized empty Git repository in /builds/ZNjBtxc3/0/test/tes/.git/ Created fresh repository. Getting source from Git repository 00:02 Fetching changes with git depth set to 50. Preparing environment 00:06 Waiting for pod ********************* to be running, status is Pending Waiting for pod ********************* to be running, status is Pending ContainersNotReady: "containers with unready status: " ContainersNotReady: "containers with unready status: " Running on runner-znjbtxc3-project-1471-concurrent-0fwjvh via *********************. Using attach strategy to execute scripts.










Git submodule set branch