Make update doesn't update to latest master branch commit

Hi,

I noticed that when running make update in my Blender source code folder it doesn’t update the master branch to the latest commit.
As of writing the master branch on Commits · blender/blender · GitHub is at d4c085c committed on Jan 8, 2023 while the master branch in my repository after running make update is at 5a761a4 committed on Dec 18, 2022.

By using git pull on the master branch I was able to update it to the latest commit. This makes me wonder are there any advantages of using make update or git pull?
And how do I get make update to update everything to the latest commit?

“It doesn’t work” isn’t really something we can help troubleshoot.

What is the full output when you run make update are there errors? is it complaining about something?

the benefits of make update over git pull is that make update also updates the submodules, svn libraries and may switch svn branches if needed, while git pull only gets you the latest code in the blender repository.

"What is the full output when you run make update are there errors? is it complaining about something?"
Actually yes, I ran make update again and here is the log:
Log.txt (2.7 KB)
In the last line it states "Blender repository skipped: no remote branch to pull from"
Please note that I already used git pull on the master branch so it is up to date right now but make update wouldn’t update it the last time I ran it.

Ah you are on a local branch, if you want master in your local branch, you’ll indeed have to do a git pull followed by a git merge origin/master and resolve any merge conflicts it may have.

So basically to fully update my Blender repository I first have to run make update followed by a git pull on the master branch?

"followed by a git merge origin/master and resolve any merge conflicts it may have."
Doesn’t git pull automatically merge my local master branch with origin/master? Or do you mean something different by that?

it does not catch up master with origin/master when you are on a local branch, it tells you about this when you switch back to master using git checkout master from your local branch, you’ll get a message along the lines of This branch is n commits behind origin/master, use git pull to catch up

1 Like

Normal workflow

make update
git branch my_noise
git switch my_noise
// do something
git add .
git commit -m"/"
git switch master

// do something

make update

git branch // see list
git switch my_noise
git merge master
// do something
git add .
git commit -m"/"
git switch master

// do something

make update
...
1 Like

This will unconditionally add all changed and new files in your source tree. Including any temporary files you might have. Which might not be what you want.

I think it’s better to explicitly list the files to add:

git status                                   #lists changed and new files
git add file1.c subdir/file3.cc     #add the files you need

Another useful trick is:

git add -p

Which will interactively show you all changes you made in files which are already known to git, and ask you if it should be included yes or no. (This skips any new files you created though).

Imho it’s better to always give a somewhat useful commit message, even in your own branches.

I described only general and simple things, yes, usually deleting the necessary files, formatting, and other things are also ther :grin:

Yes, and it’s a good list. I just think using git add -p or specifying the exact files to add is often less work than cleaning up the build dir beforehand.

But then again I generally make a big mess of log files, todo.txt files, stack traces in my build dir so maybe I’m just messy :wink: