Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Features to be added to the git commands section. #6

Open
5 tasks
HarshKapadia2 opened this issue May 15, 2020 · 28 comments
Open
5 tasks

Features to be added to the git commands section. #6

HarshKapadia2 opened this issue May 15, 2020 · 28 comments
Labels
enhancement New feature or request

Comments

@HarshKapadia2
Copy link
Owner

HarshKapadia2 commented May 15, 2020

@HarshKapadia2 HarshKapadia2 added the enhancement New feature or request label May 15, 2020
@HarshKapadia2
Copy link
Owner Author

HarshKapadia2 commented May 17, 2020

@HarshKapadia2 HarshKapadia2 changed the title Features to be added to the Git section. Features to be added to the 'git commands' section. May 17, 2020
@HarshKapadia2 HarshKapadia2 changed the title Features to be added to the 'git commands' section. Features to be added to the git commands section. May 17, 2020
@HarshKapadia2
Copy link
Owner Author

Under the git command in this section, add:

@HarshKapadia2
Copy link
Owner Author

@HarshKapadia2
Copy link
Owner Author

HarshKapadia2 commented Jul 11, 2020

@HarshKapadia2
Copy link
Owner Author

HarshKapadia2 commented Jul 11, 2020

@HarshKapadia2
Copy link
Owner Author

  • Add the git cherry-pick command.

@HarshKapadia2
Copy link
Owner Author

HarshKapadia2 commented Jul 17, 2020

  • Under git checkout, add the --orphan flag.
    • Ref article
    • Add the flag, give an explanation on what is does and its need.
    • git rm -rf or git reset --hard might be required (beware of the file not in .gitignore though.) (source)

@HarshKapadia2
Copy link
Owner Author

HarshKapadia2 commented Jul 21, 2020

  • Under the --amend flag in git commit, add the --no-edit option.
  • git commit --no-value option
  • Add --author "Full Name <[email protected]>" option to git commit.

@HarshKapadia2
Copy link
Owner Author

HarshKapadia2 commented Aug 17, 2020

  • Add a --staged flag to the git diff command.
  • Add the git mv command.

@HarshKapadia2
Copy link
Owner Author

HarshKapadia2 commented Aug 20, 2020

@HarshKapadia2
Copy link
Owner Author

@HarshKapadia2
Copy link
Owner Author

@HarshKapadia2
Copy link
Owner Author

  • Contextual git push and git pull. (Find context using git branch.)
    • Executing just git push instead of git push origin main to push code to the main branch.
    • Might not work the first time as the upstream is not set. Use git push -u origin main the first time.

@HarshKapadia2
Copy link
Owner Author

HarshKapadia2 commented Feb 20, 2021

  • Add git config --global init.defaultBranch <branch_name> to the git config sub-section.
    • This is to combat the new default main branch on GitHub.
    • Add note that this is only for GitHub and might cause problems with other services like GitLab.
    • Refer to this comment of issue replace master by main. #47.

HarshKapadia2 added a commit that referenced this issue Feb 20, 2021
@HarshKapadia2
Copy link
Owner Author

HarshKapadia2 commented Feb 20, 2021

  • From image below make the following changes to the git branch sub-section:
    • Make necessary changes to -m option in web site.
      • Check if what already exists is correct and accordingly make changes.
    • Add -u flag.
    • Add references to the branch renaming section if necessary. (The section is supposed to be added as per a comment in issue Add Branches section. #21.)

image

@HarshKapadia2
Copy link
Owner Author

@HarshKapadia2
Copy link
Owner Author

HarshKapadia2 commented May 16, 2021

@HarshKapadia2
Copy link
Owner Author

HarshKapadia2 commented Jul 30, 2021

@HarshKapadia2
Copy link
Owner Author

@HarshKapadia2
Copy link
Owner Author

  • Add directory option to git clone.
    • Eg: git clone <url>.git <dir_to_clone_into> or git clone <url>.git . (Same directory, will not create a new directory to put the files in.)

@HarshKapadia2
Copy link
Owner Author

  • Changing the default Git editor.
    • git config --global core.editor "<editor_name>"
    • VS Code: git config --global core.editor "code --wait" (Article)
    • Others: (Article)

@HarshKapadia2
Copy link
Owner Author

HarshKapadia2 commented Nov 9, 2021

@HarshKapadia2
Copy link
Owner Author

HarshKapadia2 commented Nov 18, 2021

  • Add git add -p

@HarshKapadia2
Copy link
Owner Author

HarshKapadia2 commented Dec 8, 2021

@HarshKapadia2
Copy link
Owner Author

@HarshKapadia2
Copy link
Owner Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant