this might offer an explanation to the difference between pull vs fetchdo I just need to do a "git pull" to update the repository on my computer without having to delete, then re git clone a repository?
so I'm correct? I have to use git pull origin master for the master directory, but can I just use git pull by itself and it will know which branch was used?this might offer an explanation to the difference between pull vs fetch
https://www.geeksforgeeks.org/git-difference-between-git-fetch-and-git-pull/#:~:text=Git Fetch is the command,changes into the local repository.
then if say it was the 3ds branch, it would be git pull origin 3ds?yea, I think you're on the right track.
cd /pathToYourLocalProjectFolder
git pull origin master
hmm sorry I'm not sure, haven't not really messed with git to that extent. But what I gather you replace "master" with the branch "name" .. but can't confirm personallythen if say it was the 3ds branch, it would be git pull origin 3ds?
Maybe check on stackoverflow: https://stackoverflow.com/questions...ository-with-changes-from-a-github-repositoryso I'm correct? I have to use git pull origin master for the master directory, but can I just use git pull by itself and it will know which branch was used?
git checkout in the terminal and that's it? no adding in a branch or anything?Use git checkout.
git checkout in the terminal and that's it? no adding in a branch or anything?
thank you, my friend. that makes sense now.You use git checkout to switch branches, which requires you to specify the branch.
git pull updates the branch you have checked out.
Say I'm on the main branch and I want to switch to the 3ds branch:
git checkout 3ds
git pull
That's it, I'm now on the 3ds branch and it's up to date.
Adding to novice commands, git status -> lists "staged" changesThe "normal" way is to fetch all changes using "git fetch --all" and then update only the branches that you want to update to prevent conflicts with other branches of yours. Conflicts usually happen when you change a file that someone has made changes.
But the novice commands are:
git clone -> Download Repo to your Computer
git log -> to search older commits and their unique number
git checkout [BRANCH_NAME] -> Change Repo to the specified branch or change to a commit using the unique number
git pull -> Update Repo to your Computer to the latest changes
git add -> add changes
git commit -> persist locally changes with a message
git push -> send the persisted changes locally to online to allow others to see these changes