-
Notifications
You must be signed in to change notification settings - Fork 0
/
git.csv
We can make this file beautiful and searchable if this error is corrected: Illegal quoting in line 2.
47 lines (47 loc) · 3.63 KB
/
git.csv
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
Installation (linux);sudo apt-get install git;git
Config name for the repository (onetime setting);"git config --global user.name ""Rapid1898""";git
Config mail for the repository (onetime setting - use the mail using for github.com);"git config --global user.email ""[email protected]""";git
Create repository in the actual directory;git init;git
Add file to the repository / staging area (prepared for later commit);git add file.xyz;git
Add all html-files to the repo / staging area;git add *.html;git
Add everything to the repository / staging area from the directory;git add .;git
2nd way to add everything to the repository / staging area from the directory;git add *;git
Add readme-file;git add README.md;git
remove specific file from the repository / staging area (before commiting!);git rm --cached index.html;git
Actual status in the git-directoy (eg. added files, changed files, not added,...);git status;git
"Commit files which are added / changed in the repo (with comment) - taking a ""snapshot""";"git commit -m ""comment""";git
Show overview about the last activities;git log;git
Clone a repository in the actual path;git clone github-link;git
Link the acutal folder/repo to the github-repo;git remote add origin https://github.com/link/Test.git;git
Push with upstream definition (shorthand - to the master);git push -u origin master;git
"Push with upstream definition (longhand - to the branch ""answer"")";git push --set -upstream origin answer;git
undo add command before (all files get set back to the initial state);git reset;git
undo the last commit;git reset HEAD~;git
ignore changes eg. for xlsx on the local machine;git stash;git
Pull (update) files from GitHub;git pull -u origin master;git
Enable pushing with ssh-key in Idea and VSCode;"Enable open ssh agent: https://dev.to/aka_anoop/how-to-enable-openssh-agent-to-access-your-github-repositories-on-windows-powershell-1ab8
Run commands: https://stackoverflow.com/questions/56490194/vs-code-bitbucket-ssh-permission-denied-publickey";git
all files in this folder will be ignored;add folder: /prg/dist/*;git
this specific file will be ignored;add file: /prg.xlsx;git
"Create a new branch with the name ""newFeature""";git branch newFeature;git
"Change to branch ""newFeature"" (from the master-branch)";git checkout newFeature;git
Return to the master-branch;git checkout master;git
Delete branch;git branch -d newFeature;git
"Change name of the branch - eg. for renaming branch ""master"" to ""main""";git branch -m main;git
"Create a new branch named ""new""";git checkout -b new;git
Show the difference in the files;git diff head;git
Show only the differences for the files which are not commited yet;git diff --staged;git
Merge the branch with the master;git merge newFeature;git
fork the initial repository on github (select personal account as target);click fork-button in github;git
get the forked repository clone;click code-button to grab link;git
clone the repository to the local folder;git clone github-link;git
"create branch ""answer""";git branch answer;git
"set current branch to ""answer""";git checkout answer;git
see which branch is curently active (eg. main or answer);git status;git
add all files to the stage (all in the current folder);git add .;git
when something wrong were added (undo the whole add command);(git reset);git
shows the actual files on the stage;git status;git
"commit files from stage (""take snapshot"")";"git commit -m ""Completed""";git
"push with upstream definition (to the branch ""answer"")";git push --set-upstream origin answer;git
"change from main to the branch ""answer""";select branch on git hub with button;git
make an pull request to the original repository;click pull request button;git