You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Switch to the branch you want to push: `git checkout develop`
928
+
- Push the branch as follows: `git push -u origin develop`.
929
+
930
+
::: callout-important
931
+
On the `push` command, the last argument is the name branch on the remote server. Make it consistent with the local
932
+
branch
933
+
:::
934
+
935
+
::: callout-notes
936
+
Use `git branch -vv` extensively to check the links between local/remote branches.
937
+
:::
938
+
939
+
## Deleting a branch (locally)
922
940
923
941
- Type `git checkout main`
924
942
- Type `git branch -d develop`
@@ -933,26 +951,44 @@ An error occurs! The suppression of `feat-com` implies the loss of the `d9d02608
933
951
The suppression of `develop` was ok because the content of commit `3rd` is included in the merge.
934
952
:::
935
953
954
+
## Deleting a branch (remotely)
936
955
956
+
Deletion from the remote branch is not automatic. To delete branch remotely:
957
+
958
+
-`git push origin --delete develop`
959
+
960
+
::: callout-important
961
+
Make sure that the branch should be removed or has been merged. Delete locally first and then remotely
962
+
:::
963
+
964
+
::: callout-tip
965
+
For the lazy people, the [Git Flow](https://github.com/nvie/gitflow) extension, managing branches is very easy! Everything is almost done automatically!
966
+
:::
937
967
938
968
# Large file storage (LFS)
939
969
940
-
## LFS
970
+
## What for?
941
971
942
972
To version (reasonably) large files (images, data samples) $\rightarrow$ Git with [LFS](https://git-lfs.github.com/) extension.
943
973
944
974
::: callout-warning
945
975
Make sure that the remote host is compatible with LFS (GitHub is compatible)
946
976
:::
947
977
948
-
- Type `git lfs install` to activate the extension
978
+
979
+
## LFS install
980
+
981
+
- LFS is automatically installed with Git on Windows.
982
+
- On Linux, it can be installed using `sudo apt install git`
983
+
- When it is installed, you need to activate it. To do so, type `git lfs install`
984
+
985
+
## Tracking files with LFS
986
+
949
987
- Create a `data.csv` file and add `Year,Size,Species`
950
988
- Type `git lfs track "*.csv"`
951
989
952
990
A `.gitattributes` file has appeared, which list all the file extensions managed by Git LFS.
0 commit comments