Catatan

Menunjukkan catatan yang berlabel Git

gitlab ssh: Could not resolve hostname gitlab.com: Name or service not known

Imej
 solve this error on gitlab ssh: Could not resolve hostname gitlab.com: Name or service not known fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists. The error message you're seeing suggests that Git is unable to resolve the hostname "gitlab.com" to an IP address, which means it's having trouble connecting to GitLab over SSH. Here are some steps to troubleshoot and potentially resolve this issue: 1. Check your internet connection:    Ensure that your internet connection is stable and working correctly. 2. Verify the GitLab URL:    Make sure you are using the correct GitLab URL. It should be "gitlab.com" unless you are using a self-hosted GitLab instance. 3. Check your SSH configuration:    Make sure you have an SSH key configured and added to your SSH agent. You can check this by running the following command:    ```shell    ssh -T git@gitlab.com    ```    If it's not working, you m

Apa itu .gitignore

 Rujukan artikel :  Ignoring in Git: How To Use .gitignore Files When  making commits to any Git repository , you’ll choose the files you want to stage and then you’ll commit them. But you might not want to commit every single one of your files—there are files that never need to get committed. This is where the .gitignore file is useful: it tells Git exactly which files to ignore and never track. Let’s take a look. What is gitignore? When you’re working in your copy, Git  watches every file  in and considers it in three ways: Tracked: You’ve already staged or committed the file. Untracked: You’ve not staged or committed. Ignored: You’ve explicitly told Git to ignore the file(s). The .gitignore file tells Git which  files to ignore  when committing your project to the GitHub repository. gitignore is located in the root directory of your repo. The .gitignore file itself is a plain text document. Here’s an  example .gitignore file : Copy # Binaries for programs and plugins *. exe *. exe

Git Reflog : Recover deleted git commit

Imej
 Recover deleted git commit using git reflog https://stackoverflow.com/a/34751908 References: bitbucket -  https://www.atlassian.com/git/tutorials/rewriting-history/git-reflog error: Your local changes to the following files would be overwritten by checkout -  https://stackoverflow.com/questions/22424142/error-your-local-changes-to-the-following-files-would-be-overwritten-by-checkou Recovering a deleted branch from a remote on Bitbucket (git) -  https://stackoverflow.com/questions/15596670/recovering-a-deleted-branch-from-a-remote-on-bitbucket-git

Name cannot begin with the '<' character, hexadecimal value 0x3C

Imej
Problem : Name cannot begin with the '<' character, hexadecimal value 0x3C Solution : .resx corrupt due to bad merging from git

Git Pull Repository

Imej
  References: https://www.datree.io/resources/git-force-pull

Delete commit dalam git

 Cara delete commit di dalam git

Cara import local git ke remote git

Imej
Local git   As hinted in GitHub   help : Create a new repository on GitHub. Open Git Bash. Change the current working directory to your local project. Initialize the local directory as a Git repository. $ git init Add the files in your new local repository. This stages them for the first commit. $ git add . Commit the files that you've staged in your local repository. $ git commit -m "First commit" At the top of your GitHub repository's Quick Setup page, click to copy the remote repository URL. In the Command prompt, add the URL for the remote repository where your local repository will be pushed. $ git remote add origin <remote repository URL> # Sets the new remote $ git remote -v # Verifies the new remote URL Push the changes in your local repository to GitHub if there is a remote branch called  master  (or  main  if that's what you're using) $ git push origin master Otherwise you will have to name local branch first by $ git branch -m <new

Cara setup Gitlab

Imej
TUTORIAL 2021 *NEW VERSION GITLAB To ease developer to do git things, We need to generate access key for our machine. For the security reason, just the linked key machine can access git through SSH. How to generate SSH for your machine ID 1) Go to User Settings > SSH Keys 2) Refer picture above. To generate keygen, we need to open command prompt and type...      ssh-keygen -t ED25519SSH -C "your email address" 3) Enter the directory we want to save the publish key and enter the password. 4) Go to the directory where we save the publish key. Open the file using text editor (Notepad, VS Code) 5) Open using text editor and copy all the key. 6) Enter the key on Gitlab setting 7) Done TUTORIAL 2020 1) Generate SSH     a) Buka terminal, taip ; ED25519 SSH          ssh-keygen -t ed25519 -C "email@gmail.com"     b) taipkan password     c) Buka gitBash          cat ~/.ssh/id_ed25519.pub | clip     d) Add SSH key to gitlab account          Setting > SSH Keys > paste

Apa itu Git? Nota ringkas Git

Imej
Ringkasan Git * Nanti akan dijelaskan :) * Doakan Lee rajin untuk buat video tutorial :) Nota command Git Check if Git has already been installed git --version Add your Git username & set your email git config --global user_name "YOUR USERNAME" git config --global user_name git config --global user_email "YOUR EMAIL" git config --global user_email Check your information git config --global --list Initialize a local directory for Git version control git init Clone a repo git clone https://__________ Switch to master branch git checkout master Download the latest changes in the project git pull <REMOTE> <NAME OF BRANCH> View remote repo git remote -v Add remote repo git remote add <SOURCE_NAME><REPOSITORING _PATH>