diff --git a/Readme.md b/Readme.md index 10e8eb5..c4f5b0c 100644 --- a/Readme.md +++ b/Readme.md @@ -12,6 +12,7 @@ ## Remote Execution ![Remote Execution](img/Remote_execution.png) + ## Basic commands ================= @@ -77,6 +78,62 @@ Date: Thu Apr 1 12:11:34 2021 +0200 First Commit ``` +## SHARE & UPDATE +### Retrieving updates from another repository and updating local repos +================================= + +add a git URL as an alias + +>git remote add [alias] [url] + +fetch down all the branches from that Git remote + +>git fetch [alias] + +merge a remote branch into your current branch to bring it up to date +>git merge [alias]/[branch] + + +Transmit local branch commits to the remote repository branch + +>git push [alias] [branch] + +>git pull + +fetch and merge any commits from the tracking remote branch + + +## BRANCH & MERGE +### Isolating work in branches, changing context, and integrating changes + +![Remote Execution](img/Branching.png) + +>git branch + +list your branches. a * will appear next to the currently active branch + +>git branch [branch-name] + +create a new branch at the current commit + +>git checkout + +switch to another branch and check it out into your working directory + +>git checkout -b|-B [] + +Specifying -b causes a new branch to be created as if git-branch(1) were called and then checked out. + +If -B is given, is created if it doesn’t exist; otherwise, it is reset. This is the transactional equivalent of + +>git merge [branch] + +merge the specified branch’s history into the current one + +>git log + +show all commits in the current branch’s history + ## TRACKING PATH CHANGES ### Versioning file removes and path changes ================================= @@ -93,9 +150,6 @@ Show all commit logs with indication of any paths that moved >git log --stat -M -## SHARE & UPDATE -### Retrieving updates from another repository and updating local repos -================================= ### History ```bash diff --git a/img/Branching.png b/img/Branching.png new file mode 100644 index 0000000..e6de095 Binary files /dev/null and b/img/Branching.png differ