-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathInstructions.txt
58 lines (43 loc) · 2.28 KB
/
Instructions.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
Git Hub Instructions:
*** To Create a repository ***
1) Create a new repository on Github and copy clone URL
2) In the appropriate directory, "git clone [URL]"
3) cd to directory of repository created
*** To make Changes on master branch ***
1) make changes to files as needed
2) inside the repository directory, "git add -A"
3) "git commit -m "insert commit desription here""
4) "git push"
*** To make pull changes on master branch ***
1) go to repository directory
2) "git pull"
*** To pull changes on master branch while ignoring local changes ***
1) go to repository directory
2) "git fetch --all"
3) "git reset --hard origin/master"
4) "git pull"
*** To use gitignore ***
1) create a ".gitignore" file in the repository OR create "gitignore.txt" and use "ren gitignore.txt .gitignore" OR ".gitignore."
2) type in file names or patterns in separate lines i.e. Test.txt, *.mp4, folder/, */folder/*
3) clear local index, just in case, by using "git rm -r --cached ./"
4) "git add -A"
5) "git commit -m "[comment]""
6) "git push"
*** Branch Instructions ***
Create a branch on local repository ---> inside the repository directory, "git checkout -b [branch-name]"
Push local branch to github ---> inside the repository directory, "git push origin [branch-name]"
Delete branch from local repository ---> inside the repository directory, "git branch -d [branch-name]"
Switch to different branch ---> inside the repository directory, "git checkout [branch-name]"
View all branches ---> inside the repository directory, "git branch"
Delete branch from github ---> inside the repository directory, "git push origin :[branch-name]"
Pull from a specific branch ---> inside the repository directory, "git pull origin [branch-name]"
*** LFS files ***
1) install git LFS
2) add "size.py" to git repository and run it to find extensions of files greater than 100 MB
3) inside the directory, "git lfs install"
4) inside the directory, "git lfs track "*[extension]", use "git lfs track" to view all tracked extensions
5) "git add -A"
6) "git commit -m "[comment]""
7) "git push"
8) to pull or clone, use regular git commands. P.S. make sure you have installed git LFS before you clone
9) To check the files tracked, "git lfs ls-files" after adding all files to the repo