newdevs:git:commands
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
newdevs:git:commands [2019/06/28 19:09] – [Other Commands] tmccanna | newdevs:git:commands [2024/03/25 16:29] – [Squash Commits] tmccanna | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Git for Windows | + | **New Developers Working Group** |
+ | ====== | ||
- | ===== Useful Commands ===== | + | * '' |
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | * | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
- | ==== Git Commands | + | ==== Rebase |
- | * git add myfile.txt --> stage a specific file | + | If your patch is behind current main, you'll need to rebase it. |
- | * git add -A --> stage all modified files in the current directory and subdirectories | + | |
- | | + | - Open the git branch |
- | * git branch | + | - Type: git rebase origin/ |
- | | + | |
- | * git branch -m oldbranchname newbranchname | + | |
- | * git branch -D branchname --> delete a local branch (cannot delete a branch | + | - Look for merge conflict markers in the file (>>> |
- | | + | |
- | | + | - Repeat steps 4-6 for each additional problem |
- | | + | |
- | | + | |
- | | + | |
- | | + | ==== Squash Commits ==== |
- | * git commit | + | |
- | * git commit < | + | If you have multiple commits in your local branch that you'd like to combine: |
- | | + | |
- | * git commit | + | |
- | * git config | + | |
- | * git config < | + | |
- | * git fetch < | + | |
- | * git help --> | + | * pick 9de92lsi9a LP#1839359 Select element on login not accessible |
- | * git log < | + | |
- | * git pull --> | + | * squash |
- | * git pull origin master | + | * fixup --> |
- | * git pull < | + | |
- | * git push working mybranchname | + | |
- | * git push working < | + | If you've already pushed multiple commits up to your remote working git repository, you can still combine them: |
- | * git remote -v --> | + | |
- | * git reset HEAD myfile.txt --> | + | |
- | * git reset <nowiki>--hard</ | + | |
- | * git rm badfile.txt | + | |
- | * git show < | + | |
- | * git status | + | |
- | * git version | + | |
+ | | ||
+ | |||
+ | |||
+ | ==== Common Bash Commands ==== | ||
+ | |||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | |||
+ | ==== Vim Text Editor ==== | ||
+ | |||
+ | The vim text editor is built into the bash console (similar | ||
+ | |||
+ | * '' | ||
+ | * '' | ||
+ | |||
+ | Vim opens in command mode, which allows | ||
+ | * '' | ||
+ | * '' | ||
+ | * '': | ||
+ | * '': | ||
+ | * '': | ||
+ | * '': | ||
+ | * ''? | ||
- | ==== Other Commands ==== | ||
- | * cd --> move back to the home folder | ||
- | * cd foldername --> move from the current folder to a child folder | ||
- | * cd .. --> move up in the folder hierarchy one level | ||
- | * clear --> clears your command window giving you a fresh screen to work with | ||
- | * ls --> list all of the folders and files in the current folder | ||
- | * ls -l --> lists all of the folders and files in the current folder with additional detail such as last modified timestamp | ||
- | * mkdir newfoldername --> create a new folder | ||
- | * notepad++ newdocname.txt --> create a new file and open it in notepad++ | ||
- | * notepad++ docname.txt --> edit an existing file in notepad++ | ||
- | * pwd --> see what folder you are currently in | ||
newdevs/git/commands.txt · Last modified: 2024/03/25 16:35 by tmccanna