When watching a Git repo, can I remove a file from the Watch list? (10+ email notifications on this one file per day) - github

I get too many Git notifications due to one file in a large repo I need to Watch. How can I exclude it?
I end up deleting a lot of email notifications based on this one file.

Related

How to save multiple versions of a file on GitHub

I'm fairly new to programming and thought I'd try out version control. I created a GitHub account to help me track my journey of creating my first webpage.
I want to upload updated versions of my code as I go along (e.g. Stage1, then perhaps when I progress a little further Stage2, then Stage 3 etc). This would essentially be the same file of code but each time it will be added to/ edited slightly.
Could someone advise me as to how to do this?
Thank you! :)
Every commit you push to your repository is stored and then you can access every version that you have committed afterward.
Just go into your repo, click at your commits tab:
Commits Tab
Then you can access the version by clicking the commit hash you desire to browse:
Commit hash abbreviated
After this, you just click in browse files.
If you want to use in your computer another version, you just have to git checkout 'commit hash' inside your folder at sync with your git repo.

Github File change notification for PR

I have seen that other people asked the same question, the solution doesn't work for me.
So, I have a repo that developers push files to.
What I want to be able to do is track one single file in the repo and have an email notification sent when that file has been modified and a PR opened and is open for review. Is this possible? Do I have to setup notification on the repo level or set "watch" for the specific repo/file.
Thank you,
Roland

How to know when a commit was pushed to a remote repository on GitHub?

I am working on a project where I need to know when exactly a commit was pushed to a remote repository on Github. Using the git APIs and commands I can only find the commit's 'authored_date' and 'committed_date', which represent the time of the commit at the local repository.
I tried the approaches presented in this question: Is there a way in git to obtain a push date for a given commit?. They only work when a commit was pushed from the same local machine, while I need them for commits in a cloned projects.
Thank you.
Try to play with List Repository Events
For example:
https://api.github.com/repos/JetBrains/kotlin/events
It returns all the events for the repository.
Look there for the event with type="PushEvent" containing your commit SHA in the payload/comits/sha
This approach has some limitations:
you can not request filtered events by type, you are only able to fetch them all and filter them on your side
Only events created within the past 90 days will be included in timelines (according to GitHub doc)
you have to care about pagination if you have massive events on your project

What are staged/unstage files in SourceTree (with Github) and can I pull files selectively?

I have a project with a notification like "develop 10↓". Does this mean there are 10 files changed recently on GITHUB since the last pull?
Where can I view the files that were changed? Can I pull them selectively? (only a few of them after revising each).
Where can I review the before-after differences?
What is a staged/unstaged file? Any good and straightforward tutorials, please let me know.
...notification like "develop 10↓". Does this mean there are 10 files changed...
The "develop 10↓" part is talking about commits, not files. It means you have 10 new commits on the server that you haven't merge yet on your local branch.
Where can I view the files that were changed?
You can view these files by simply look at the corresponding commit.
Can I pull them selectively?
Well you can merge commits one by one if that's what your asking
What is a staged/unstaged file?
The unstaged files are just the files with the last modifications you brought. The staged file are like a snapshot that you take at a T time, Git will store these snapshots under staged files (one snapshot/file at a time).
You can find an excellent and complete lesson about Git into this link https://laracasts.com/series/git-me-some-version-control

How to check out file in Git?

I just started using github.com and my friend and I are working on a project. How can I pull parts of the project but check out certain files I'm working on so he doesn't work on them. He can still download the files but he won't be able to open or edit them until I upload them back and give permission?
I suppose you mean lock a file when you edit it. Git won't let you do this and it's not something you need to worry about. Instead, you can both work on the same file and then merge your changes later.
If you really want to work that way (i.e: lock files, or at least control when your friend will modify your repo), you can ask your friend to fork your repo.
That way, he/she:
will have his/her own copy of said repo
will work on any file
will rebase first with branches fetched from your repo (added as a remote on his/her fork, as described in GitHub: working with remotes)
will make pull request, allowing to decide what to include and when.
Historically version control systems provide a checkin/checkout feature. When you do a checkout, you reserve the artifact. If another person also has the same file checked out, then you get an error when trying to checkin the artifact. Not sure creating another fork is really the equivale