From f01df333b68f7ad315b0708b1571c2cc4b929a33 Mon Sep 17 00:00:00 2001 From: Me1e Date: Tue, 28 Mar 2023 23:56:41 +0900 Subject: [PATCH] Fixed with "<>" syntax for use on github. The reason for the change is that the words between the "<>" are not visible on the reading page. --- 2022/Days/day37.md | 46 +++++++++++++++++++++++----------------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/2022/Days/day37.md b/2022/Days/day37.md index 8f2c54b..692a974 100644 --- a/2022/Days/day37.md +++ b/2022/Days/day37.md @@ -71,10 +71,10 @@ I have taken these from [atlassian](https://www.atlassian.com/git/tutorials/atla | Command | Example | Description | | ------------- | --------------------------- | --------------------------------------------------------------------------------------------------------------------------- | | git init | `git init ` | Create an empty git repository in the specified directory. | -| git clone | `git clone ` | Clone repository located at onto local machine. | +| git clone | `git clone ` | Clone repository located at \ onto local machine. | | git config | `git config user.name` | Define author name to be used for all commits in current repository `system`, `global`, `local` flag to set config options. | -| git add | `git add ` | Stage all changes in for the next commit. We can also add and <.> for everything. | -| git commit -m | `git commit -m ""` | Commit the staged snapshot, use to detail what is being committed. | +| git add | `git add ` | Stage all changes in \ for the next commit. We can also add \ and \<.> for everything. | +| git commit -m | `git commit -m ""` | Commit the staged snapshot, use \ to detail what is being committed. | | git status | `git status` | List files that are staged, unstaged and untracked. | | git log | `git log` | Display all commit history using the default format. There are additional options with this command. | | git diff | `git diff` | Show unstaged changes between your index and working directory. | @@ -83,8 +83,8 @@ I have taken these from [atlassian](https://www.atlassian.com/git/tutorials/atla | Command | Example | Description | | ---------- | --------------------- | ------------------------------------------------------------------------------------------------------------------------------------- | -| git revert | `git revert ` | Create a new commit that undoes all of the changes made in then apply it to the current branch. | -| git reset | `git reset ` | Remove from the staging area, but leave the working directory unchanged. This unstaged a file without overwriting any changes. | +| git revert | `git revert ` | Create a new commit that undoes all of the changes made in \ then apply it to the current branch. | +| git reset | `git reset ` | Remove \ from the staging area, but leave the working directory unchanged. This unstaged a file without overwriting any changes. | | git clean | `git clean -n` | Shows which files would be removed from the working directory. Use `-f` in place of `-n` to execute the clean. | ### Git Rewriting History @@ -92,25 +92,25 @@ I have taken these from [atlassian](https://www.atlassian.com/git/tutorials/atla | Command | Example | Description | | ---------- | -------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | | git commit | `git commit --amend` | Replace the last commit with the staged changes and the last commit combined. Use with nothing staged to edit the last commit’s message. | -| git rebase | `git rebase ` | Rebase the current branch onto . can be a commit ID, branch name, a tag, or a relative reference to HEAD. | +| git rebase | `git rebase ` | Rebase the current branch onto \. \ can be a commit ID, branch name, a tag, or a relative reference to HEAD. | | git reflog | `git reflog` | Show a log of changes to the local repository’s HEAD. Add --relative-date flag to show date info or --all to show all refs. | ### Git Branches | Command | Example | Description | | ------------ | -------------------------- | ------------------------------------------------------------------------------------------------------------- | -| git branch | `git branch` | List all of the branches in your repo. Add a argument to create a new branch with the name . | -| git checkout | `git checkout -b ` | Create and check out a new branch named . Drop the -b flag to checkout an existing branch. | -| git merge | `git merge ` | Merge into the current branch. | +| git branch | `git branch` | List all of the branches in your repo. Add a \ argument to create a new branch with the name \. | +| git checkout | `git checkout -b ` | Create and check out a new branch named \. Drop the -b flag to checkout an existing branch. | +| git merge | `git merge ` | Merge \ into the current branch. | ### Git Remote Repositories | Command | Example | Description | | -------------- | ----------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- | -| git remote add | `git remote add ` | Create a new connection to a remote repo. After adding a remote, you can use as a shortcut for in other commands. | -| git fetch | `git fetch ` | Fetches a specific , from the repo. Leave off to fetch all remote refs. | +| git remote add | `git remote add ` | Create a new connection to a remote repo. After adding a remote, you can use \ as a shortcut for \ in other commands. | +| git fetch | `git fetch ` | Fetches a specific \, from the repo. Leave off \ to fetch all remote refs. | | git pull | `git pull ` | Fetch the specified remote’s copy of current branch and immediately merge it into the local copy. | -| git push | `git push ` | Push the branch to , along with necessary commits and objects. Creates named branch in the remote repo if it doesn’t exist. | +| git push | `git push ` | Push the branch to \, along with necessary commits and objects. Creates named branch in the remote repo if it doesn’t exist. | ### Git Diff @@ -123,23 +123,23 @@ I have taken these from [atlassian](https://www.atlassian.com/git/tutorials/atla | Command | Example | Description | | ---------------------------------------------------- | ------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------- | -| git config --global user.name | `git config --global user.name ` | Define the author name to be used for all commits by the current user. | -| git config --global user.email | `git config --global user.email ` | Define author email to be used for all commits by the current user. | -| git config --global alias | `git config --global alias ` | Create shortcut for a git command . | -| git config --system core.editor | `git config --system core.editor ` | Set the text editor to be used by commands for all users on the machine. arg should be the comamnd that launches the desired editor. | +| git config --global user.name \ | `git config --global user.name ` | Define the author name to be used for all commits by the current user. | +| git config --global user.email \ | `git config --global user.email ` | Define author email to be used for all commits by the current user. | +| git config --global alias \ \ | `git config --global alias ` | Create shortcut for a git command . | +| git config --system core.editor \ | `git config --system core.editor ` | Set the text editor to be used by commands for all users on the machine. \ arg should be the comamnd that launches the desired editor. | | git config --global --edit | `git config --global --edit ` | Open the global configuration file in a text editor for manual editing. | ### Git Rebase | Command | Example | Description | | -------------------- | ---------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- | -| git rebase -i | `git rebase -i ` | Interactively rebase current branch onto . Launches editor to enter commands for how each commit will be transferred to the new base. | +| git rebase -i \ | `git rebase -i ` | Interactively rebase current branch onto \. Launches editor to enter commands for how each commit will be transferred to the new base. | ### Git Pull | Command | Example | Description | | -------------------------- | ---------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | -| git pull --rebase | `git pull --rebase ` | Fetch the remote’s copy of current branch and rebases it into the local copy. Uses git rebase instead of the merge to integrate the branches. | +| git pull --rebase \ | `git pull --rebase ` | Fetch the remote’s copy of current branch and rebases it into the local copy. Uses git rebase instead of the merge to integrate the branches. | ### Git Reset @@ -147,16 +147,16 @@ I have taken these from [atlassian](https://www.atlassian.com/git/tutorials/atla | ------------------------- | --------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | | git reset | `git reset ` | Reset the staging area to match the most recent commit but leave the working directory unchanged. | | git reset --hard | `git reset --hard` | Reset staging area and working directory to match most recent commit and overwrites all changes in the working directory | -| git reset | `git reset ` | Move the current branch tip backwards to , reset the staging area to match, but leave the working directory alone | -| git reset --hard | `git reset --hard ` | Same as previous, but resets both the staging area & working directory to match. Deletes uncommitted changes, and all commits after . | +| git reset \ | `git reset ` | Move the current branch tip backwards to \, reset the staging area to match, but leave the working directory alone | +| git reset --hard \ | `git reset --hard ` | Same as previous, but resets both the staging area & working directory to match. Deletes uncommitted changes, and all commits after \. | ### Git Push | Command | Example | Description | | ------------------------- | --------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- | -| git push --force | `git push --force` | Forces the git push even if it results in a non-fast-forward merge. Do not use the --force flag unless you’re sure you know what you’re doing. | -| git push --all | `git push --all` | Push all of your local branches to the specified remote. | -| git push --tags | `git push --tags` | Tags aren’t automatically pushed when you push a branch or use the --all flag. The --tags flag sends all of your local tags to the remote repo. | +| git push \ --force | `git push --force` | Forces the git push even if it results in a non-fast-forward merge. Do not use the --force flag unless you’re sure you know what you’re doing. | +| git push \ --all | `git push --all` | Push all of your local branches to the specified remote. | +| git push \ --tags | `git push --tags` | Tags aren’t automatically pushed when you push a branch or use the --all flag. The --tags flag sends all of your local tags to the remote repo. | ## Resources