-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbasic_instructions.txt
More file actions
70 lines (58 loc) · 1.91 KB
/
Copy pathbasic_instructions.txt
File metadata and controls
70 lines (58 loc) · 1.91 KB
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
ssh >> passphrase for key : lmynad1982
git status
// initial set up
git init
git init HOPE_OLAP
git config --global user.name "Lalama1982"
git config --global user.email "lalamaesp@gmail.com"
// setting the remote
-- git remote rm origin
git remote add origin git@github.com:Lalama1982/JSHtml_Stuff-tablesCreatRead.git
git remote add origin https://github.com/Lalama1982/JSHtml_Stuff-tablesCreatRead.git
// cloning
git clone git@github.com:Lalama1982/gitOperations.git
git clone https://github.com/Lalama1982/gitOperations.git
// pull
git pull origin main
git pull origin master
// create a branch
git branch -M main
git branch -M main_branch
// fetch & merge
git fetch
git log
git merge origin/main
// add changes, committing & push
git add .
git add -A
git add file_name.txt
git reset
git commit -m "first commit"
// if config changed after a commit
git commit --amend --reset-author
// push
git push
git push -u origin main
git push --set-upstream origin main
// adding to a custom branch "main_branch" of the remote repo
echo "# MultiJs_Stuff-OAuth_Expr_React_Passport_BackEnd" >> README.md
git init
git add README.md
git add .
git add -p basic_instructions.txt // patch wise, get to choose the part to commit
git diff basic_instructions.txt
git commit // -- add msg -- & press "Esc" & :wq (save & quit)
git commit -m "first commit"
git log
git branch -M main_branch
git remote add origin https://github.com/Lalama1982/MultiJs_Stuff-OAuth_Expr_React_Passport_BackEnd.git
git push -u origin main_branch
// if need to push to master, replace "main_branch" with "master"
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
-- Task: Copy stuff from "repo1" to "repo2"
cd repo2
git remote add repo1 git@github.com:Lalama1982/repo1.git
git fetch repo1
git merge repo1/master --allow-unrelated-histories
-- nothing to commit, but just push
--git remote rm repo1