-
Notifications
You must be signed in to change notification settings - Fork 0
/
Commands.txt
125 lines (103 loc) · 4.04 KB
/
Commands.txt
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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
## A USEFUL LIST OF DEVELOPMENT ENVIRONMENT COMMANDS
----------------------------------------------------------
----------------------------------------------------------
:wq
VSCode > Push > Git to A2 > A2 auto back to Git > local sync / local rebase.
git fetch origin
git checkout master
git merge origin/master
OR
## Merge with Allow Unrelated Histories:
git merge origin/master --allow-unrelated-histories
## IF conflicts, resolve manually by edditing file. Add Resolved Files
git add file1 file2 etc
## Commit Changes
git commit -m "Resolved merge conflicts"
## Verify Merge Status:
git status
## Pull the Latest Changes:
git branch
git checkout branch-name # replace branch-name with your branch, e.g., main or master
git pull origin branch-name # replace branch-name with your branch name
Handle Merge Conflicts (if any):
## Steps to Open a Pull Request
a "Pull Request" (PR) is a feature that allows you to notify team members that you
have completed a feature or a fix and that you want them to review your changes
and possibly merge them into a target branch (here its usually master).
Here’s a breakdown of what it means to "open a pull request":
git checkout -b my-feature-branch
# Make your changes
git add .
git commit -m "Add my feature"
git push origin my-feature-branch
----------------------------------------------------------
## Conflicts when pull
Check Repository Status:
Before pulling changes, you may want to check the status of your local repository to ensure
there are no uncommitted changes:
git status
Fetch the latest changes from the remote repository without merging them:
git fetch origin
If there are merge conflicts, Git will notify you. You will need to resolve these conflicts manually.
Open the conflicting files, resolve the conflicts, and then commit the changes:
git add .
git commit -m "Resolved merge conflicts"
----------------------------------------------------------
## FORCE PUSH TO GIT
echo "Trigger workflow" >> README.md
git add README.md
git commit -m "Trigger GitHub Actions workflow"
git push origin master
----------------------------------------------------------
## PUSH TO GIT
git add .
git commit -m "SSH KEYS SET. PUSH TO SERVER FIX."
git push origin master
----------------------------------------------------------
## Manual node startup
kill -9 7711 4002 4803 3847 4793
nvm use x.xxx
npm install
npm run build
----------------------------------------------------------
## Manual Install dependencies
nvm use 14
npm install react react-dom express @react-oauth/google
npm install react/jsx-runtime
pkill node
----------------------------------------------------------
## Terminal Process Control
ps faux
top
ps -e | wc -l
ps -ef | wc -l
ps -e --no-headers | wc -l
ls /proc | grep '^[0-9]' | wc -l
ps -ef | grep defunct
----------------------------------------------------------
## List versions
ldd --version
which npx
which node
node -v
npm -v
npx -v
npm stop
npm cache clean --force
----------------------------------------------------------
## Steps for a Clean Restart
rm -rf build
npm run build
----------------------------------------------------------
----------------------SSH PROMPTS------------------------
----------------------------------------------------------
## Generate a New SSH Key Pair:
ssh-keygen -t ed25519 -C "your_email@example.com"
eval "$(ssh-agent -s)"
ssh-add ~/.ssh/id_ed25519
chmod 600 ~/.ssh/authorized_keys
chmod 700 ~/.ssh
cat ~/.ssh/id_ed25519
cat ~/.ssh/id_ed25519.pub
## Add Public Key to authorized_keys:
echo "THE-PUBLIC-KEY" >> ~/.ssh/authorized_keys